How to Accommodate Email Addresses that have Special Characters

Konvey, for the most part, adheres to the Wiki definition of an email address . The local-part of the email address may use any of these ASCII characters:

  • Latin  letters  A  to  Z  and  a  to  z ;
  • digits  0  to  9 ;
  • special characters  !#$%&'*+-/=?^_`{|}~ ;
  • dot  . , provided that it is not the first or last character unless quoted, and provided also that it does not appear consecutively unless quoted (e.g.  John..Doe@example.com  is not allowed but  "John..Doe"@example.com  is allowed);
  • space and  "(),:;<>@[\]  characters are allowed with restrictions (they are only allowed inside a quoted string, as described in the paragraph below, and in addition, a backslash or double-quote must be preceded by a backslash);
  • comments are allowed with parentheses at either end of the local-part; e.g.  john.smith(comment)@example.com  and  (comment)john.smith@example.com  are both equivalent to  john.smith@example.com .
  • uppercase and lowercase Latin letters A to Z and a to z;
  • digits 0 to 9;
  • special characters !#$%&'*+-/=?^_`{|}~;
  • dot ., provided that it is not the first or last character unless quoted, and provided also that it does not appear consecutively unless quoted (e.g. John..Doe@konvey.com is not allowed but "John..Doe"@konvey.com is allowed);
  • space and "(),:;<>@[\] characters are allowed with restrictions (they are only allowed inside a quoted string, as described in the paragraph below, and in addition, a backslash or double-quote must be preceded by a backslash);
  • comments are allowed with parentheses at either end of the local-part; e.g. john.williams(comment)@konvey.com and (comment)john.williams@konvey.com are both equivalent to john.williams@konvey.com.

In addition to the above ASCII characters, international characters above U+007F, encoded as UTF-8, are permitted by RFC 6531, though mail systems may restrict which characters to use when assigning local-parts.

A quoted string may exist as a dot separated entity within the local-part, or it may exist when the outermost quotes are the outermost characters of the local-part (e.g., abc."defghi".xyz@example.com or "abcdefghixyz"@example.com are allowed.[citation needed] Conversely, abc"defghi"xyz@example.com is not; neither is abc\"def\"ghi@example.com).[citation needed] Quoted strings and characters however, are not commonly used.[citation needed] RFC 5321 also warns that "a host that expects to receive mail SHOULD avoid defining mailboxes where the Local-part requires (or uses) the Quoted-string form".

Technically all other local-parts are case-sensitive, therefore jsmith@example.com and JSmith@example.com could be different mailboxes; however, Konvey (and most of the industry) treat uppercase and lowercase letters as equivalent.

Despite the wide range of special characters which are technically valid; organisations, mail services, mail servers and mail clients in practice often do not accept all of these characters. Common advice is to avoid using some special characters to avoid the risk of rejected emails.

This is the REGX that Konvey Uses

^((?:[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-z]{2,})$