mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #29830 -- Fixed loss of custom utf-8 body encoding in mails.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user