Should uppercase letters be allowed in email addresses?

20,380

Solution 1

Probably, the correct compromise is to let them register with the capitalization of their choice, and show that where appropriate ("[email protected] Inbox"). But you should canonicalize the capitalization for uniqueness checks, since there are many badly behaved email senders that e.g. capitalize the entire email address before sending.

Solution 2

In Microsoft SQL server, by default, indexes are case insensitive.

If you put a unique index on the field, the user can have a reader-friendly CamelCase name like [email protected] and duplicates like [email protected] will be rejected automatically.

Solution 3

The reason for the standard was so that non-Unix systems could participate in the ARPAnet and later Internet with minimal hassles. (VMS and Tenex were common in the former, and BITNET was also represented. In the latter at least, lowercase characters required 3278 or upgraded 3270 terminals.) These days, it's best to ignore case in the localpart, as everyone has figured out how to use lowercase out of necessity.

Solution 4

I personally would choose to standardize/lowercase all emails. This simplifies things for you because, if a user is sending email or logging in on your system, it is very simple to mistype an email address - [email protected] vs [email protected]. And, as yous said, the big providers have made this decision to follow this pattern. Even if you allowed uppercase letters, it would confuse your general user base as they have come to expect something different (AKA all lowercase).

Share:
20,380
Xeoncross
Author by

Xeoncross

PHP, Javascript, and Go Application developer responsible for over 50 open source projects and libraries at https://github.com/xeoncross By default I build Go backends with AngularJS frontends. Thanks to Ionic and Electron this even works for mobile and desktop apps. Bash, PHP, Python, Node.js, and random linux libraries are used for specific tasks because of the size of the ecosystems or libraries for odd jobs.

Updated on July 09, 2022

Comments

  • Xeoncross
    Xeoncross almost 2 years

    The official RFC documents state that we can use both upper and lowercase letters in the "local" part of the domain (plus many other crazy things).

    However, what is common in the real world - and what the spec say are two different things. None of those extra characters (! # $ % & ' * / = ? ^ { | } ~) are allowed in emails from large providers like yahoo, google, or hotmail. In addition, it is very, very rare to see an email that contains capital letters ([email protected]).

    I sent myself a couple emails today using different upper and lowercase combos and found that my email servers all treated them as the same account ignoring the fact that the letter casing was different. In other words, [email protected] = [email protected] to my email servers (including my free email accounts).

    Should I act on the format the world has chosen - and standardize/lowercase all ANSII emails? Or should I allow users to register multiple accounts as [email protected], [email protected], and [email protected]?

  • Xeoncross
    Xeoncross over 13 years
    So is capitalization the standard for delivery while lowercase is the standard for display?
  • Matthew Flaschen
    Matthew Flaschen over 13 years
    No, I'm not suggesting capitalization (upper-casing) for delivery is correct, a good idea, or used by most senders. But it's incorrectly used by a significant number. And as I said, you should display the original address to the user where appropriate. For canonicalization, lower-casing or upper-casing should both be okay, as long as you're consistent.
  • Xeoncross
    Xeoncross over 13 years
    I mostly use PostgreSQL, however, MySQL shares the same case-insensitive nature you describe. However, this is about more than just storage - I also need to email these accounts.
  • stefan
    stefan over 13 years
    @Xeoncross no you should deliver to the same address the sender wrote, the receiving server might be case sensitive.