mirror of https://github.com/django/django.git
[1.6.x] Fixed #19107 -- Restored bug fix for sending unicode email with Python 2.6.5 and below.
This commit is contained in:
parent
8567c1a3c2
commit
e4b2bea743
|
@ -132,6 +132,8 @@ class MIMEMixin():
|
|||
"""
|
||||
fp = six.StringIO()
|
||||
g = generator.Generator(fp, mangle_from_=False)
|
||||
if sys.version_info < (2, 6, 6) and isinstance(self._payload, six.text_type):
|
||||
self._payload = self._payload.encode(self._charset.output_charset)
|
||||
g.flatten(self, unixfrom=unixfrom)
|
||||
return fp.getvalue()
|
||||
|
||||
|
|
|
@ -30,3 +30,6 @@ Bugfixes
|
|||
* Fixed the "ORA-01843: not a valid month" errors when using Unicode
|
||||
with older versions of Oracle server
|
||||
(`#20292 <https://code.djangoproject.com/ticket/20292>`_).
|
||||
|
||||
* Restored bug fix for sending unicode email with Python 2.6.5 and below
|
||||
(`#19107 <https://code.djangoproject.com/ticket/19107>`_).
|
||||
|
|
Loading…
Reference in New Issue