GeezerVison is showing github.com — Support formatting UTF-8 email addresses · Issue #118716 · python/cpython
Support formatting UTF-8 email addresses #118716
Description
Feature or enhancement
Proposal:
RFC 6530 allows UTF-8 strings in email addresses.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
Activity
bitdancer commented on May 7, 2024
This is not a minor feature, because RFCs are never simple. I haven't read the RFC in detail. The new email API (is supposed to) fully support RFC 6532 (see policy.SMTPUTF8), and can interoperate with smtplib to correctly send and receive internationalized email messages (at least in theory). Any new abilities/requirements in RFC 6530 that are not met by the existing code should be addressed in the new API. The legacy API only supports the older RFCs and so should not be modified.
cedk commented on May 7, 2024
ContributorAuthor
More actions
The formataddr is useful even with the new email API to format correctly the name and the address when you have only the name and the full address.
cedk commented on May 8, 2024
ContributorAuthor
More actions
Indeed email.headerregistry.Address could be used but it does not support neither non-ASCII local part if used with addr_spec argument.
So I think it should also be extended.
bitdancer commented on May 9, 2024
Right, that's where the extension should be done. I'd have to read the RFC to decide if a new policy flag is needed, but my guess from a very cursory skim is that it wouldn't be. I'm guessing allowing it if policy.utf8 is True would be enough. But like I said, I haven't actually read the RFC (yet).
bitdancer commented on Apr 18, 2026
We are attempting to address this issue in a different way in #81074. For the reasons discussed there the approach taken for the PR attached to this issue no longer seems optimal, so I'm closing this as a duplicate.
hugovk commented on Oct 29, 2026
Metadata
Metadata
Development
No branches or pull requestsIssue actions