Skip to content

Commit 07c5e33

Browse files
committed
Added conditional decoding of bytes subject text, before interpolating into a new unicode string.
- Legacy-Id: 16577
1 parent 7039520 commit 07c5e33

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ietf/utils/mail.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def copy_email(msg, to, toUser=False, originalBcc=None):
165165
# Overwrite the From: header, so that the copy from a development or
166166
# test server doesn't look like spam.
167167
new['From'] = settings.DEFAULT_FROM_EMAIL
168-
new['Subject'] = '[Django %s] %s' % (settings.SERVER_MODE, msg.get('Subject', '[no subject]'))
168+
new['Subject'] = '[Django %s] %s' % (settings.SERVER_MODE, force_text(msg.get('Subject', '[no subject]')))
169169
new['To'] = to
170170
send_smtp(new)
171171

0 commit comments

Comments
 (0)