homepage

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 drlazor8
Recipients barry, drlazor8, r.david.murray
Date 2020年02月26日.09:36:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1582709775.3.0.571538664603.issue39757@roundup.psfhosted.org>
In-reply-to
Content
Affected python version: 3.5 and above (did test them all except 3.9)
Steps to reproduce:
 from mail.message import EmailMessage
 from mail.policy import SMTP
 msg = EmailMessage(policy=SMTP)
 msg['To'] = 'Joe <joe@examplé.com>' # notice the é in the domain
 print(msg.as_string())
It prints
 To: "Joe <joe@=?utf-8?q?exampl=C3=A9?=.com>"
But it should be
 To: "Joe <joe@xn--exampl-gva.com>"
While b64/qp can be used to encode most non-ascii headers, the domain part of an email address is an exception. According to IDNA2008 (rfc5890 , rfc5891), non-ascii domain should be encoded using the punycode algorithm and the ACE prefix.
History
Date User Action Args
2020年02月26日 09:36:15drlazor8setrecipients: + drlazor8, barry, r.david.murray
2020年02月26日 09:36:15drlazor8setmessageid: <1582709775.3.0.571538664603.issue39757@roundup.psfhosted.org>
2020年02月26日 09:36:15drlazor8linkissue39757 messages
2020年02月26日 09:36:15drlazor8create

AltStyle によって変換されたページ (->オリジナル) /