decodes plaintext automatically fixes #64

This commit is contained in:
Chris 2023-11-22 16:59:36 +01:00
parent 87404cc3d7
commit 85f7b30570

View file

@ -56,7 +56,7 @@ class CustomHandler:
return '500 Attachment too large. Max size: ' + str(ATTACHMENTS_MAX_SIZE/1000000)+"MB"
attachments['file%d' % len(attachments)] = att
else:
plaintext += part.get_payload()
plaintext += part.get_payload(decode=True).decode('utf-8')
elif part.get_content_type() == 'text/html':
html += part.get_payload()
else: