﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
12791	Setting encoding on EmailMessage does not produce intended result	oyvind	oyvind	"{{{

class MEmailMessage(EmailMessage):

    encoding = 'ISO-8859-1'

}}}

Produces a message with a header that says it is iso-8859-1, but the quoted-printable-encoded data in the body is utf-8.

{{{

class EmailMessage(object):

    ...

    def message(self):
        encoding = self.encoding or settings.DEFAULT_CHARSET
        msg = SafeMIMEText(smart_str(self.body, settings.DEFAULT_CHARSET),
                           self.content_subtype, encoding)

    ...

}}}

Should be:

{{{

class EmailMessage(object):

    ...

    def message(self):
        encoding = self.encoding or settings.DEFAULT_CHARSET
        msg = SafeMIMEText(smart_str(self.body, encoding),
                           self.content_subtype, encoding)

    ...

}}}
"		closed	Core (Mail)	dev		fixed	iso-8859-1 utf-8 smart_str mail header		Ready for checkin	1	0	0	0	0	0
