From f2f787294c8c29408d47293153fd45f915a139cd Mon Sep 17 00:00:00 2001 From: Gabriel Date: Mon, 10 Jun 2019 15:27:54 -0300 Subject: [PATCH] Fixed reading attached mails with undisclosed recipients --- workflows/Ews2Case.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/workflows/Ews2Case.py b/workflows/Ews2Case.py index d4aced3..4d65062 100644 --- a/workflows/Ews2Case.py +++ b/workflows/Ews2Case.py @@ -89,8 +89,11 @@ def connectEws(): #inline attachments are pictures in the email body tmpFilepath = tempAttachment.writeFile() to = str() - for recipient in msg.to_recipients: - to = to + recipient.email_address + ' ' + if msg.to_recipients: + for recipient in msg.to_recipients: + to = to + recipient.email_address + ' ' + else: + to = '' comment = 'Attachment from email sent by ' comment += str(msg.author.email_address).lower() comment += ' and received by '