On Wed, 26 Nov 2003, Keith C. Ivey wrote:

> Unfortunately, Mail::Address->new('', '')->format is just an
> empty string rather than '<>'.  But that makes sense, since no
> other address gets angle brackets added when the phrase part is
> empty.  It looks like qpsmtpd should be using Mail::Address
> ->new('', '') to represent an empty address.

It helps, I think, to remember that there are three different 
address objects, which are all related:

- a To:/From: header address
- a rcpt to:/mail from: address
- an envelope address.

We are discussing here the empty envelope address, which appears as <> in
a mail from: conversation (although some smtp daemons will accepts just an
empty string).

I don't ever expect the empty envelope address to appear in a To: header, 
so I'm not surprised that folk can't decide what
Mail::Address->new('', '')->format should produce. 

Note also that both of these are valid To: headers:

To: <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]

Hence Mail::Address->new('', '[EMAIL PROTECTED]')->format could produce 
either '<[EMAIL PROTECTED]>' or '[EMAIL PROTECTED]' without conflicting with 
the POD.

--
Charlie


Reply via email to