summary refs log tree commit diff
path: root/synapse/push/mailer.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2016-04-22 18:31:47 +0100
committerDavid Baker <dave@matrix.org>2016-04-22 18:31:47 +0100
commit83bf65297a624a205ce13e27f0f7c887b7db48af (patch)
tree19b4fe2b7c71c139b2ba3cf9f1536d0df9e11e35 /synapse/push/mailer.py
parentImplement group-of-people names (diff)
downloadsynapse-83bf65297a624a205ce13e27f0f7c887b7db48af.tar.xz
Mime part is binary so encode it first.
Doesn't get character enocind right yet but makes it not error.
Diffstat (limited to 'synapse/push/mailer.py')
-rw-r--r--synapse/push/mailer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/push/mailer.py b/synapse/push/mailer.py
index e68d701ffd..f679718b02 100644
--- a/synapse/push/mailer.py
+++ b/synapse/push/mailer.py
@@ -77,7 +77,7 @@ class Mailer(object):
 
         plainText = self.notif_template.render(**template_vars)
 
-        text_part = MIMEText(plainText, "html")
+        text_part = MIMEText(plainText.encode('utf8'), "html")
         text_part['Subject'] = "New Matrix Notifications"
         text_part['From'] = self.hs.config.email_notif_from
         text_part['To'] = email_address