summaryrefslogtreecommitdiff
path: root/service/pixelated
diff options
context:
space:
mode:
Diffstat (limited to 'service/pixelated')
-rw-r--r--service/pixelated/adapter/mail.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/service/pixelated/adapter/mail.py b/service/pixelated/adapter/mail.py
index f21ed2ef..fdfeda89 100644
--- a/service/pixelated/adapter/mail.py
+++ b/service/pixelated/adapter/mail.py
@@ -155,7 +155,11 @@ class InputMail(Mail):
mime_multipart['Subject'] = self.headers['Subject']
mime_multipart['Date'] = self.headers['Date']
- mime_multipart.attach(MIMEText(self.body, 'plain'))
+ if type(self.body) is list:
+ for part in self.body:
+ mime_multipart.attach(MIMEText(part['raw'], part['content-type']))
+ else:
+ mime_multipart.attach(MIMEText(self.body, 'plain'))
return mime_multipart
def to_smtp_format(self):