Email address RFC

development, fun Add comments

It’s was entertaining to dig into email address format while working on a corresponding task.

Here are a few facts that I didn’t expect to be allowed for email address:

  • the local part of an email address can contain spaces, and it must be quoted and escaped by a back slash like “\ “
  • the local part of an email address can contain comments! It’s put in parentheses and can be omitted. Example: “john(comment).smith@example.com” equals to “john.smith@example.com
  • domain part can have IP instead of domain. To do that, it must be put in square braces like “john@[192.168.1.1]”

Here are examples of VALID email addresses:

  • '@[10.10.10.10]
  • user@[IPv6:2001:db8:1ff::a0b:dbd0]
  • "much.more\ unusual"@example.com
  • "very.unusual.@.unusual.com"@example.com
  • "very.(),:;<>[]\".VERY.\"very@\\\ \"very\".unusual"@strange.example.com
  • 0@a
  • !#$%&'*+-/=?^_`{}|~@example.org
  • "()<>[]:;@,\\\"!#$%&'*+-/=?^_`{}|\ \ \ \ \ ~\ \ \ \ \ \ \ ?\ \ \ \ \ \ \ \ \ \ \ \ ^_`{}|~.a"@example.org
  • ""@example.org

Comments are closed.

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in