The EmailValidation setting

Abstract

When a user submits an email address, EXM uses the EmailValidation setting to verify that a string is in valid email format.

When a user submits an email address, Email Experience Manager uses the EmailValidation setting to verify that the string is in valid email format.

The EmailValidation setting takes a regular expression for email validation as a value.

The default regex is not RFC compliant and does not cater for all cases. To address specific regional use cases or business needs, you should use a custom regular expression.

The EmailValidation setting is located in the <sitecore>/<settings> section of the EXM configuration file:

\files\App_Config\Include\EmailExperience\Sitecore.EmailExperience.Core.config

You can replace the default value with your custom regex:

<setting name="EmailValidation" value="^[a-zA-Z0-9_-]+(?:\.[a-zA-Z0-9_-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$" />

The recommended way to modify the setting is to comment out the default value or to override the configuration file to keep a record of the initial value.