This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients barry, lpirl, r.david.murray
Date 2013-07-25.18:43:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1374777787.48.0.683613025293.issue18557@psf.upfronthosting.co.za>
In-reply-to
Content
No, but you can do this:

  >>> utils.getaddresses(['a@example.com, b@example.com'])
  [('', 'a@example.com'), ('', 'b@example.com')]

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: a@example.com, b@example.com\n\n', policy=email.policy.default)
  >>> m['to']
  'a@example.com, b@example.com'
  >>> 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 :)
History
Date User Action Args
2013-07-25 18:43:07r.david.murraysetrecipients: + r.david.murray, barry, lpirl
2013-07-25 18:43:07r.david.murraysetmessageid: <1374777787.48.0.683613025293.issue18557@psf.upfronthosting.co.za>
2013-07-25 18:43:07r.david.murraylinkissue18557 messages
2013-07-25 18:43:07r.david.murraycreate