Closed aisbergg closed 3 years ago
Seems amazing! Would you mind to adding a test case please? Demonstrating that the charset is / is not added. Possibly around / into test_1000_split
or test_1000_split_html
.
Yes, I will take care of writing a few tests
The repository doesn't contain any pytests yet, only test content for mails and gpg/smime keys. Do you have any tests laying around, that you just not yet committed? Or what kind of test shall I include for the PR?
Oh my, I just realized you have your tests in the root of the repo 🙄
If you think this is a bad practice to have tests.py in the root, I'm open to your suggestions.
I extended the test to look for "charset" in the headers as well. I am not sure how to add a test for the opposite case now, were the "charset" header would be missing 🤔
Thanks a lot!
I've released a patch, thanks for collaboration.
As explained in the comments of the source code, the ContentManager will transfer a bytes encoded string as base64 encoded content. By default it doesn't take the original utf-8 encoding into account and therefore won't add the correct email
charset
header. This results in special characters being displayed wrong in most email clients.This patch sets the correct utf-8 encoding in the described cases.