Message348871
Right, and the python email package fully supports non ascii:
>>> msg = EmailMessage()
>>> msg['Subject'] = "Panamá- Casco Antiguo"
>>> bytes(msg)
b'Subject: =?utf-8?q?Panam=C3=A1-?= Casco Antiguo\n\n'
>>> str(msg)
'Subject: Panamá- Casco Antiguo\n\n'
>>> msg['subject']
'Panamá- Casco Antiguo'
make_header also supports non-ascii, you just have to tell it what charset you want to use. Like I said, make_header is part of the *legacy* API, and it really is a pain to use. That's why we wrote the new API. |
|
Date |
User |
Action |
Args |
2019-08-01 18:45:59 | r.david.murray | set | recipients:
+ r.david.murray, barry, maxking, aldwinaldwin, yunlee |
2019-08-01 18:45:58 | r.david.murray | set | messageid: <1564685158.94.0.152575707797.issue37532@roundup.psfhosted.org> |
2019-08-01 18:45:58 | r.david.murray | link | issue37532 messages |
2019-08-01 18:45:58 | r.david.murray | create | |
|