10

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

5
  • 2
    I think you want to read RFC 5322 section 4.4. This would certainly not be the only thing allowed for in email addresses that makes parsing them more complicated than the normal case today requires, but many of these obsolete special address formats were necessary when one of the major purposes of SMTP was to allow interoperability with everyone's and their dog's proprietary email system, all of which had their own unique address syntax.
    – user
    Aug 16 '15 at 19:02
  • Good point that the standard has to be backward compatible, but I'm wondering what was the original motivation for allowing comments inside the address.
    – j_h
    Aug 16 '15 at 20:00
  • @random I'm assuming there was a specific reason for allowing parenthesised comments, and am hoping that someone knows the answer, or can at least provide examples where this feature can be used to achieve specific functionality that could not be obtained otherwise. How come this is on hold as an opinion-based question?
    – j_h
    Aug 16 '15 at 20:11
  • Your comment now says this is a "too broad" question, and one that is also not in scope. Asking for the reasoning/use case why something was implemented a certain way falls outside of SU
    – random
    Aug 16 '15 at 20:17
  • Seems to me like there should be a very specific answer to the question: either there was some obscure historical reason, and comments are now allowed only for legacy reasons (and therefore should be discouraged/deprecated), or there is a particular functionality that they enable (as seems to be suggested by the standard). I would have thought this question would be of interest to 'computer enthusiasts and power users' who want to get the most out of their use of email.
    – j_h
    Aug 16 '15 at 20:33
2

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.