From 4f34668c2787ca2d955ee9d446bde5f3b487547b Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Fri, 10 Nov 2017 11:53:08 +0100 Subject: [PATCH] tests if message encoded --- rowers/management/commands/processemail.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rowers/management/commands/processemail.py b/rowers/management/commands/processemail.py index 686d3ced..aa36ea14 100644 --- a/rowers/management/commands/processemail.py +++ b/rowers/management/commands/processemail.py @@ -121,7 +121,8 @@ class Command(BaseCommand): extension = attachment.document.name[-3:].lower() try: message = Message.objects.get(id=attachment.message_id) - if message.text: + if mm.encoded: +# if message.text: body = "\n".join(message.text.splitlines()) else: body = message.get_body()