Address multipart mime ending up in description, for #700

This commit is contained in:
Garret Wassermann 2019-02-16 02:18:07 -05:00
parent f6fe5a7834
commit 344dd75a1c

View File

@ -507,7 +507,7 @@ def object_from_message(message, queue, logger):
counter += 1
if not body:
mail = BeautifulSoup(part.get_payload(), "lxml")
mail = BeautifulSoup(str(message), "html.parser")
beautiful_body = mail.find('body')
if beautiful_body:
try:
@ -515,7 +515,7 @@ def object_from_message(message, queue, logger):
except AttributeError:
pass
if not body:
body = mail.text
body = ""
smtp_priority = message.get('priority', '')
smtp_importance = message.get('importance', '')