johnstok
johnstok

Reputation: 98270

How do I upper case an email address?

I expect this should be a pretty easy question. It is in two parts:

  1. Are email addresses case sensitive? (i.e. is [email protected] different from [email protected]?)
  2. If so, what is the correct locale to use for capitalising an email address? (i.e. capitalising the email [email protected] would be different in the US and Turkish locales)

Upvotes: 8

Views: 2768

Answers (4)

grapefrukt
grapefrukt

Reputation: 27045

Judging from the specs the first part can be case sensitive, but normally it's not.
Since it's all ASCII you should be safe using a "naive" uppercase function.

Check out the RFC spec part of the wikipedia article on E-mail adresses

If you're in for some heavier reading RFC5322 and RFC5321 should be useful too.

Upvotes: 13

Ali
Ali

Reputation: 5426

Email address are not case sensitive.

The local-part of the e-mail address may use any of these ASCII characters:

  1. Uppercase and lowercase English letters (a-z, A-Z)
  2. Digits 0 through 9
  3. Characters ! # $ % & ' * + - / = ? ^ _ ` { | } ~
  4. Character . provided that it is not the first nor last character, nor may it appear two or more times consecutively.

    Source :Wikipedia

Upvotes: 0

Zach Scrivena
Zach Scrivena

Reputation: 29559

The local-part of the email address (i.e. before the @) is case-sensitive in general. From the Wikipedia entry on E-mail address:

The local-part is case sensitive, so "[email protected]" and "[email protected]" may be delivered to different people. This practice is, however, discouraged by RFC 5321. However, only the authoritative mail-servers for a domain may make that decision.

For the detailed specifications, you may wish to consult the following RFCs:

  • RFC 5321: Simple Mail Transfer Protocol
  • RFC 5322: Internet Message Format
  • RFC 3696: Application Techniques for Checking and Transformation of Names

Upvotes: 7

chburd
chburd

Reputation: 4159

domain names are case insensitive. so [email protected] is the same email as [email protected]

for user names, it depends of the mail server. in the Outlook server my company uses it is also case insensitive

Upvotes: 4

Related Questions