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 jwilk
Recipients docs@python, jwilk
Date 2016-02-24.13:37:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1456321062.13.0.278509193885.issue26426@psf.upfronthosting.co.za>
In-reply-to
Content
https://docs.python.org/3/library/email-examples.html#examples-using-the-provisional-api contains the following code:

from email.headerregistry import Address
...
msg['From'] = Address("Pepé Le Pew", "pepe@example.com")
msg['To'] = (Address("Penelope Pussycat", "penelope@example.com"),
             Address("Fabrette Pussycat", "fabrette@example.com"))

But Address takes just the username, not the whole email address, as the second argument. So this should be written as:

msg['From'] = Address("Pepé Le Pew", "pepe", "example.com")
...

or:

msg['From'] = Address("Pepé Le Pew", addr_spec="pepe@example.com")
...
History
Date User Action Args
2016-02-24 13:37:42jwilksetrecipients: + jwilk, docs@python
2016-02-24 13:37:42jwilksetmessageid: <1456321062.13.0.278509193885.issue26426@psf.upfronthosting.co.za>
2016-02-24 13:37:42jwilklinkissue26426 messages
2016-02-24 13:37:41jwilkcreate