[nycphp-talk] PEAR Mail and pine "To:" peculiarity
W. @llen Shaw
ashaw at polymerdb.org
Mon Oct 24 08:35:57 EDT 2005
David Mintz wrote:
> One thing I'm not clear on (said he, modulating into another topic) is
> whether we are supposed to put double-quotes around "John Daly," to use
> your example. It appears that we are.
Right, me too, though it seems to me that rfc 2822
(http://www.rfc-editor.org/rfc/rfc2822.txt) makes no mention of quoting
the display-name.
However, it is true that if your display-name has any special characters
in it (this includes the "period" character ".", among other things) and
you don't double-quote it, PEAR Mail is going to refuse to send it,
saying "validation failed for W. Allen Shaw <ashaw at polymerdb.org>"
Note this interesting snippet from RFC 2822:
> Note: The "period" (or "full stop") character (".") in obs-phrase is
> not a form that was allowed in earlier versions of this or any other
> standard. Period (nor any other character from specials) was not
> allowed in phrase because it introduced a parsing difficulty
> distinguishing between phrases and portions of an addr-spec (see
> section 4.4). It appears here because the period character is
> currently used in many messages in the display-name portion of
> addresses, especially for initials in names, and therefore must be
> interpreted properly. In the future, period may appear in the
> regular syntax of phrase.
Apparently current email implementations are handling special characters
in display-name on their own terms; I would think it's wise to use
double-quotes around the display-name unless you know for sure they
won't use special characters.
BTW, I'm glad you asked, as it gave me finally the extra curiosity to
learn more. Hopefully somebody will correct me if I'm wrong here.
Take care,
Allen
--
Allen Shaw
Polymer (http://polymerdb.org)
More information about the talk
mailing list