mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #27848 -- Prevented crash when attaching a .eml file to a message
Thanks Sébastien Ramage for the report.
This commit is contained in:
@@ -381,7 +381,7 @@ class EmailMessage:
|
||||
elif not isinstance(content, Message):
|
||||
# For compatibility with existing code, parse the message
|
||||
# into an email.Message object if it is not one already.
|
||||
content = message_from_string(content)
|
||||
content = message_from_string(force_text(content))
|
||||
|
||||
attachment = SafeMIMEMessage(content, subtype)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user