From b4256116e0fb002378da83711cddb02cdaf26882 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Sun, 15 Mar 2015 10:17:42 +0200 Subject: server/rz_mail: allow feedback comment to be utf-8 The "MIMEMultipart" utf-8 argument is not required for $SUBJECT, but I thought it might be relevant for the recipients list eventually (it could contain utf-8 text iiuc, not in the email portion but in the additional text allowed). --- src/server/rz_mail.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server') diff --git a/src/server/rz_mail.py b/src/server/rz_mail.py index a13892c6..ca575dee 100644 --- a/src/server/rz_mail.py +++ b/src/server/rz_mail.py @@ -31,12 +31,12 @@ def send_message_helper(smtp_hostname, send_from, recipients, subject, attachmen """ assert isinstance(recipients, list) - msg = MIMEMultipart() + msg = MIMEMultipart('utf-8') msg['From'] = send_from msg['To'] = COMMASPACE.join(recipients) msg['Date'] = formatdate(localtime=True) msg['Subject'] = subject - msg.attach(MIMEText(body)) + msg.attach(MIMEText(body, _charset='utf-8')) for filename, mimetype, data in attachments: maintype, subtype = mimetype.split('/') -- cgit v1.3.1