I've read that by standard first part of e-mail is case sensitive, however I've tried to send e-mail to name@example.com
, Name@example.com
and NAME@example.com
- it has arrived in each case.
How do mail servers handles usernames? Is it possible to miss with case and that message wouldn't be delivered? Is it really very important to use exactly same letter case, as was written while registering when giving your e-mail address?
From RFC 5321: Simple Mail Transfer Protocol, section 2.3.11:
The standard mailbox naming convention is defined to be "local-part@domain"; contemporary usage permits a much broader set of applications than simple "user names". Consequently, and due to a long history of problems when intermediate hosts have attempted to optimize transport by modifying them, the local-part MUST be interpreted and assigned semantics only by the host specified in the domain part of the address.
So yes, the part before the "@" could be case-sensitive, since it is entirely under the control of the host system. In practice though, no widely used mail systems distinguish different addresses based on case.
The part after the @ sign however is the domain and according to RFC 1035, section 3.1,
"Name servers and resolvers must compare [domains] in a case-insensitive manner"
Since the local-part is interpreted by the receiving end and not the sending end, you, on the sending end, should handle email addresses in a case-sensitive manner even if some hosts decide to handle the local-part in a case-insensitive way.
One of the comments under this answer states:
I work at a large company and there is another person with the same first and last name. I discovered today that his local-part differs from mine only in capitalization. This has been working properly, so I was surprised to see "no widely used mail systems distinguish different addresses based on case". We use MS Exchange which I would call "widely used". – @Matthew James Briggs
This can be used as a prime example of why you should care to handle email addresses in a case-sensitive manner.