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 elenril
Recipients andrei.avk, barry, elenril, r.david.murray
Date 2021-07-07.08:11:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <162564551204.1481.9727507943773640709@lain.red.khirnov.net>
In-reply-to <1625590796.01.0.479491431973.issue39100@roundup.psfhosted.org>
Content
Quoting R. David Murray (2021-07-06 18:59:56)
> How are you encountering this error?  The following program runs without exception for me on master:
> 
> from email import message_from_binary_file
> from email.policy import SMTP
> 
> msg = message_from_binary_file(open('mail.eml', 'rb'), policy=SMTP)
> print(msg)

The exception is thrown on accessing the 'to' header, so make that
print(msg['to'])
History
Date User Action Args
2021-07-07 08:11:59elenrilsetrecipients: + elenril, barry, r.david.murray, andrei.avk
2021-07-07 08:11:59elenrillinkissue39100 messages
2021-07-07 08:11:59elenrilcreate