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.

classification
Title: smtplib AUTH command doesn't handle EAI arguments
Type: behavior Stage: patch review
Components: Library (Lib) Versions: Python 3.9, Python 3.8, Python 3.7, Python 3.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: jrlevine
Priority: normal Keywords: patch

Created on 2021-05-30 19:25 by jrlevine, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 26709 open jrlevine, 2021-06-13 17:28
Messages (1)
msg394779 - (view) Author: John L (jrlevine) * Date: 2021-05-30 19:25
In an EAI (SMTPUTF8) mail session, AUTH usernames and passwords can be UTF-8, not just ASCII.

The fix is easy.  In smtplib.py, in three places in the auth() and auth_cram_md5() routines change ".encode('ascii')" to ".encode(self.command_encoding)"

I have tried this with EAI mail servers in India and China to be sure it works.
History
Date User Action Args
2022-04-11 14:59:46adminsetgithub: 88435
2021-06-13 17:28:41jrlevinesetkeywords: + patch
stage: patch review
pull_requests: + pull_request25299
2021-05-30 19:25:20jrlevinecreate