Message336374
AFAIK, the email address should support non-ASCII character (from https://stackoverflow.com/questions/760150/can-an-email-address-contain-international-non-english-characters and SMTPUTF8
option from https://docs.python.org/3/library/smtplib.html#smtplib.SMTP.sendmail)
>>> import smtplib
>>> s = smtplib.SMTP(host='smtp-mail.outlook.com', port=587)
>>> s.verify('你好@outlook.com')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/windson/learn/cpython/Lib/smtplib.py", line 577, in verify
self.putcmd("vrfy", _addr_only(address))
File "/Users/windson/learn/cpython/Lib/smtplib.py", line 367, in putcmd
self.send(str)
File "/Users/windson/learn/cpython/Lib/smtplib.py", line 352, in send
s = s.encode(self.command_encoding)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 5-6: ordinal not in range(128)
I found this issue when I updating https://github.com/python/cpython/pull/8938/files |
|
Date |
User |
Action |
Args |
2019-02-23 07:59:18 | Windson Yang | set | recipients:
+ Windson Yang, vstinner, ezio.melotti |
2019-02-23 07:59:18 | Windson Yang | set | messageid: <1550908758.26.0.552141628876.issue36093@roundup.psfhosted.org> |
2019-02-23 07:59:18 | Windson Yang | link | issue36093 messages |
2019-02-23 07:59:18 | Windson Yang | create | |
|