Django: EmailMessage encode the subject in base64 when translated and contains non US-ASCII characters
The usual behavior of the EmailMessage class regarding its subject is to keep it as it is if i contains only US-ASCII characters and to encode it as quoted-printable if it contains non US-ASCII characters.
That works well and avoid our emails to be considered as pishing by antispam from email servers
But in the specific context of translations there is a bug -> if the subject of an email is translated into another language (through the built-in django translations tools) and contains non US-ASCII characters, by an mechanism I didn't catch, the subject is encoded as base64 and not quoted-printable.
This results in being considered as spam by the email servers (tested on Gandi and Gmail)...
I submitted a ticket on https://code.djangoproject.com/
Do you have any idea of the mechanism that leads to this encoding in base64 instead of quoted-printable when we translate the subject of a mail ?