From 85f7b3057036c6041a027bdbc2dc019b53c20f17 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 22 Nov 2023 16:59:36 +0100 Subject: [PATCH] decodes plaintext automatically fixes #64 --- python/mailserver3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/mailserver3.py b/python/mailserver3.py index 7f54c56..f63769a 100644 --- a/python/mailserver3.py +++ b/python/mailserver3.py @@ -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: