summaryrefslogtreecommitdiff
path: root/django/core
diff options
context:
space:
mode:
authorjannschu <jannik.schuerg@posteo.de>2018-10-22 12:21:33 -0700
committerTim Graham <timograham@gmail.com>2018-10-22 15:21:33 -0400
commitefc0f77f02de86a94e21cafd3c8409eb7dd99ef6 (patch)
treeb5e5e8c7c35148be61bcfc9acdc8b15a1aabae40 /django/core
parent043407ec7e6e659a69c2432319140b4a813928d2 (diff)
Fixed #29830 -- Fixed loss of custom utf-8 body encoding in mails.
Diffstat (limited to 'django/core')
-rw-r--r--django/core/mail/message.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/mail/message.py b/django/core/mail/message.py
index 9a0f0eba45..2f89ffbfc4 100644
--- a/django/core/mail/message.py
+++ b/django/core/mail/message.py
@@ -170,7 +170,7 @@ class SafeMIMEText(MIMEMixin, MIMEText):
MIMEText.__setitem__(self, name, val)
def set_payload(self, payload, charset=None):
- if charset == 'utf-8':
+ if charset == 'utf-8' and not isinstance(charset, Charset.Charset):
has_long_lines = any(
len(l.encode()) > RFC5322_EMAIL_LINE_LENGTH_LIMIT
for l in payload.splitlines()