18

According to the standard, it's possible to insert 'comments' inside email addresses, such that john(hello @(world!) )@example.com and john@(my)example.com direct to john@example.com.

The standard states (in Section 3.2.2):

A comment is normally used in a structured field body to provide some human-readable informational text.

However, the inclusion of comments makes parsing valid email addresses much more complicated, and I'm struggling to think of any cases where such comments enable additional functionality that couldn't be achieved otherwise. Was there some obscure historical reason for their inclusion, and comments are now allowed only for legacy reasons (and therefore should be discouraged/ deprecated), or is there a particular functionality that they enable (as seems to be suggested by the standard)?

It seems that Thunderbird parses out these comments and displays them in the 'To' field (see image below), but this works only for messages sent to specific types of accounts, and I haven't found any documentation about this behaviour.

enter image description here

j_h
  • 189

1 Answers1

6

Comments inside email addresses are supported mainly so that a deprecated form of email addresses - Specifically, "john@example.com (John Smith)" instead of "John Smith <john@example.com>" can be handled.

This old-style notation defined parenthesized content as arbitrary comments as has been pointed out here and referenced in RFC 822 as part of the general commenting convention:

http://www.freesoft.org/CIE/RFC/822/16.htm

.. So as you can see, the original email format has its roots from the early RFC 822 standard formed in 1982 to replace the ARPANET standard RFC 733 which also used parenthesis as comments. Eventually, brackets were standardized upon, however support for the original format has remained.

RE: https://en.wikipedia.org/wiki/Email#Message_format

sean2078
  • 442