Skip to content

Set content-transfer encoding for email messages to base64. - #3160

Closed
symbolist wants to merge 1 commit into
masterfrom
usman/lms1466-emai-charset
Closed

Set content-transfer encoding for email messages to base64.#3160
symbolist wants to merge 1 commit into
masterfrom
usman/lms1466-emai-charset

Conversation

@symbolist

Copy link
Copy Markdown
Contributor

Django (version <= 1.6) globally overrides python's default Content-Transfer-Encoding for UTF-8 messages from base64 to 7bit. We set it to base64 again otherwise mail servers add newlines and exclamation marks (sendmail ) when a line is longer than 989 characters.

This only applies to the plaintext version though; the html alternative and any non-text attachments are always encoded with base64. So any client which displays the plaintext version will show the extra exclamation marks and newlines.

Btw this behaviour has been changed in the latest django: https://code.djangoproject.com/ticket/12422

Screenshots on the ticket.
LMS-1466

@brianhw @sarina Can you review this?

Django (version <= 1.6) globally overrides python's default
Content-Transfer encoding for UTF-8 messages from base64 to
7bit. We set it to base64 again otherwise mail servers add
newlines and exclamation marks when a line is longer than
989 characters.

LMS-1466
@brianhw

brianhw commented Apr 7, 2014

Copy link
Copy Markdown
Contributor

If the solution you've chosen is to BASE64-encode the UTF-8 messages, are you concerned that you will receive unwanted attention from some spam filters? Do we have any way of monitoring whether this is happening? Just concerned that we are masking one problem and creating another. For a different perspective, see https://code.google.com/p/android/issues/detail?id=2630.

@sarina

sarina commented Apr 7, 2014

Copy link
Copy Markdown
Contributor

@symbolist I am a bit confused, the ticket LMS-1466 explicitly applies to users receiving the HTML version of the email. I think I care less about the plaintext displaying properly, because that does not break images. If making plaintext email display properly increases our spam score I'm not sure that's a good tradeoff. And this does not solve LMS-1466 as it does not address the major issues users are seeing with receiving our HTML bulk email.

@symbolist

Copy link
Copy Markdown
Contributor Author

@symbolist symbolist closed this Apr 28, 2014
@symbolist
symbolist deleted the usman/lms1466-emai-charset branch April 28, 2014 12:43
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

Successfully merging this pull request may close these issues.

4 participants