email.Utils.parseaddr() gives arcane result

M

Mark Sapiro

email.Utils.parseaddr('Real Name ((comment)) <[email protected]>')

returns

('comment <[email protected]>', 'Real')

Granted the string above is invalid as RFC 2822 does not allow
parentheses within comments, but most mail agents seem to at least take
the contents of the angle brackets as the address.

rfc822.parseaddr() returns the same result in this case.

If these functions aren't going to return their respective failure
indication in this case, I think they should at least return
'(e-mail address removed)' as the second item of the returned tuple.

--
(for email use this address please - you can figure it out)

Mark Sapiro msapiro -at- value net Any clod can have the facts;
San Francisco Bay Area, California having opinions is an art. -
C. McCabe, The Fearless Spectator
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top