Message365596
Using email.policy.SMTP a message's non-ASCII characters are not encoded. The policy.utf8 attribute is set to False as documented.
The attached script illustrates the behaviour. I get the following command line output from it:
Subject: =?utf-8?b?w7zDtsOk?=
False
Subject: üöä
True
Subject: üöä
The default compat32 policy encodes the string, but the SMTP policy does not encode it, but leaves it as UTF-8 despite policy.utf8 == False. I might be misreading the documentation here, but it seems to me like utf8 == False implies that encoding should happen. |
|
Date |
User |
Action |
Args |
2020-04-02 13:52:09 | aepsil0n | set | recipients:
+ aepsil0n, barry, r.david.murray |
2020-04-02 13:52:09 | aepsil0n | set | messageid: <1585835529.27.0.884427076581.issue40157@roundup.psfhosted.org> |
2020-04-02 13:52:09 | aepsil0n | link | issue40157 messages |
2020-04-02 13:52:09 | aepsil0n | create | |
|