diff options
| author | Tim Graham <timograham@gmail.com> | 2014-07-30 09:28:43 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-07-30 09:29:08 -0400 |
| commit | e4b2bea743944b67a55d0ef3d17982a2319f866d (patch) | |
| tree | 1fe29a5b5908dc6542129a35d3da4c5cda2918ab | |
| parent | 8567c1a3c2ed4a031ced735116ef6d2796473271 (diff) | |
[1.6.x] Fixed #19107 -- Restored bug fix for sending unicode email with Python 2.6.5 and below.
| -rw-r--r-- | django/core/mail/message.py | 2 | ||||
| -rw-r--r-- | docs/releases/1.6.6.txt | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/django/core/mail/message.py b/django/core/mail/message.py index 95762ff89d..5bcb588c10 100644 --- a/django/core/mail/message.py +++ b/django/core/mail/message.py @@ -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() diff --git a/docs/releases/1.6.6.txt b/docs/releases/1.6.6.txt index fb182f5dcb..92c330dbca 100644 --- a/docs/releases/1.6.6.txt +++ b/docs/releases/1.6.6.txt @@ -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>`_). |
