Decode quoted-printable html bodies when getting email

Fixes #719
This commit is contained in:
Timothy Hobbs
2019-03-06 13:49:23 +01:00
parent 4fb6c40c4e
commit 2c3ce8903f
3 changed files with 41 additions and 1 deletions

View File

@@ -481,8 +481,9 @@ def object_from_message(message, queue, logger):
body.encode('utf-8')
logger.debug("Discovered plain text MIME part")
else:
payload = encoding.smart_bytes(part.get_payload(decode=True))
files.append(
SimpleUploadedFile(_("email_html_body.html"), encoding.smart_bytes(part.get_payload()), 'text/html')
SimpleUploadedFile(_("email_html_body.html"), payload, 'text/html')
)
logger.debug("Discovered HTML MIME part")
else: