"Hicks, Matthew" <[EMAIL PROTECTED]> writes:

> > Ewen Marshall wrote:
> > > It's cool.... I found the answer on the site Lutz told me about....
> > > 
> > > From     =>'(Ewen Marshall) [EMAIL PROTECTED]',

This is valid, but it is inferior to:

> I've also seen this format: 
> 
>       "Ewen Marshall" <[EMAIL PROTECTED]>

If you read RFC 2822 (http://www.ietf.org/rfc/rfc0822.txt) carefully,
you will see that anything in parentheses is a "comment", which means
it is semantically equivalent to a single space.  So there is no
reason for mail-reading software to treat "(Ewen Marshall)" as a
person's name; in fact, it is WRONG to do so.

If you look at the grammar for the contents of a From line, you find
it is a "mailbox":

  mailbox     =  addr-spec                    ; simple address
                 /  phrase route-addr         ; name & addr-spec

Without going into too much detail...  An "addr-spec" is a bare Email
address, a "phrase" is a sequence of words (more on that in a moment),
and a "route-addr" is an Email address in angle brackets.

So there are two valid forms for a mailbox: A bare address, or a
phrase followed by an address in angle brackets.  That phrase is
sometimes called the "display name", and any correct software will
treat it as a human's name for display purposes.

If you use:

  (Ewen Marshall) [EMAIL PROTECTED]

...you are using the first form (bare address), because the stuff in
parens is just an arbitrary comment, equivalent to whitespace.

But if you use:

  Ewen Marshall <[EMAIL PROTECTED]>

...you are using the second form of a mailbox.  Any correct software
will treat this as a two-word display name followed by an Email
address.  Rejecting this is definitely wrong.

Now, the notion of "word" is a little funny.  A bare "word" cannot
contain any of the special characters, which means things like parens,
periods, semicolons, and square brackets are illegal.  So this address
is NOT legal:

  Patrick J. LoPresti <[EMAIL PROTECTED]>

To include a period in my display name, I must enclose it in quotes,
like so:

  "Patrick J. LoPresti" <[EMAIL PROTECTED]>

Semantically, this is a SINGLE "word" (everything in quotes) followed
by my Email address.  That single word is my display name.

Since such quoting never hurts and sometimes helps, many MUAs always
apply it, even when it is not required.  For example, many MUAs would
render Ewen's address as:

  "Ewen Marshall" <[EMAIL PROTECTED]>

This has become such a common practice that perhaps some systems do
not even recognize multi-word display names.  I suspect this is the
case with Ewen's mail server.

Note that all this stuff is not just hypothetical.  Lotus Notes, for
instance, completely ignores names in parentheses; but it displays
quoted names as the user's full name in the message summary.

To sum up, for maximum interoperability you should prefer this format:

  "Ewen Marshall" <[EMAIL PROTECTED]>

Cheers!

 - Pat
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to