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))
<[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 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 '[EMAIL PROTECTED]' as
the second item of the returned tuple.

Note that

parseaddr('Real Name <[EMAIL PROTECTED]> ((comment))')

does return

('Real Name', '[EMAIL PROTECTED]')

as 'expected'.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1409460&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to