Skip to content
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

pyramid mailer incorrectly encodes from-header if international characters exist #99

Open
ztane opened this issue Oct 19, 2022 · 0 comments
Assignees

Comments

@ztane
Copy link

ztane commented Oct 19, 2022

Python 3.10, if relevant,

>>> m = pyramid_mailer.message.Message(sender='ÄÖ <foo@bar>', recipients=['baz@quux'], body='foo')
>>> print(m.to_message().as_string())
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
From: =?utf-8?b?w4TDliA8Zm9vQGJhcj4=?=
To: baz@quux
Content-Disposition: inline

foo

The header is incorrectly quoted, the quoting must not affect the actual header. For example Amazon SES is unable to handle this. Not sure if anything else would either. I guess the fix would be to use the email.message.EmailMessage from Python 3.6+.

@digitalresistor digitalresistor self-assigned this Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants