-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Templated SMTP Output: Enforce SMTPUTF8 policy #2546
base: develop
Are you sure you want to change the base?
Conversation
Thank you for the fix! I'll look into it, hopefully this weekend. If the CI tests fail, it's likely not because of your changes. |
I'm struggling to reproduce the error you are getting with For this purpose I added the character to the tests: sebix@40cbc90 The switch to the UT8 Policy also changes the line separator
In your example, the non-ASCII characters are in the subject, not in from or to. https://docs.python.org/3/library/email.policy.html#email.policy.EmailPolicy.utf8
So the switch doesn't enable/disable UTF-8, it just activates the conversion. Both settings should work. |
I now tested sending an e-mail with a recipient-address containing a non-ASCII character (
But the result is the same, independent of using So the issue is not the subject but the sender/recipient address and that your server doesn't support SMTPUTF8 and therefore requires a conversion for compatibility. |
The bot encountered this kind of error when processing emails containing non-ASCII characters (e.g., accents or special symbols):
UnicodeEncodeError: 'ascii' codec can't encode character '\xe0' in position 4: ordinal not in range(128)
Dump example :