R. David Murray added the comment: No, but you can do this:
>>> utils.getaddresses(['[email protected], [email protected]']) [('', '[email protected]'), ('', '[email protected]')] Not the worlds most intuitive API, I know...which is why we have implemented a new improved API. In 3.3, by using the new (provisional) policies, you can get a parsed list of addresses right from the Message object, without having to do any further processing yourself: >>> import email.policy >>> m = email.message_from_string('To: [email protected], [email protected]\n\n', policy=email.policy.default) >>> m['to'] '[email protected], [email protected]' >>> m['to'].addresses (Address(display_name='', username='a', domain='example.com'), Address(display_name='', username='b', domain='example.com')) This new code is not as battle tested as the old code, so I need people to try using it in order to find the bugs :) ---------- resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <[email protected]> <http://bugs.python.org/issue18557> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
