[ python-Bugs-1409460 ] email.Utils.parseaddr() gives arcane result

SourceForge.net noreply at sourceforge.net
Wed Jan 18 23:19:07 CET 2006


Bugs item #1409460, was opened at 2006-01-18 14:19
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1409460&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Mark Sapiro (msapiro)
Assigned to: Nobody/Anonymous (nobody)
Summary: email.Utils.parseaddr() gives arcane result

Initial Comment:
email.Utils.parseaddr('Real Name ((comment))
<addr... at example.com>')

returns

('comment <addr... at example.com>', '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 in this case.

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 'addr... at example.com' as
the second item of the returned tuple.

Note that

parseaddr('Real Name <addr... at example.com> ((comment))')

does return

('Real Name', 'addr... at example.com')

as 'expected'.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1409460&group_id=5470


More information about the Python-bugs-list mailing list