diff options
| author | jannschu <jannik.schuerg@posteo.de> | 2018-10-22 12:21:33 -0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-10-22 15:21:33 -0400 |
| commit | efc0f77f02de86a94e21cafd3c8409eb7dd99ef6 (patch) | |
| tree | b5e5e8c7c35148be61bcfc9acdc8b15a1aabae40 /django/core | |
| parent | 043407ec7e6e659a69c2432319140b4a813928d2 (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.py | 2 |
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() |
