diff options
| author | Alon Levy <alon@pobox.com> | 2015-03-15 10:17:42 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-03-15 10:17:45 +0200 |
| commit | b4256116e0fb002378da83711cddb02cdaf26882 (patch) | |
| tree | 196eff85e35b91ced8581d81ed9decb6bfe13295 /src | |
| parent | 40e65da00cf2edc76f10d7107786a5d4ff85dfb5 (diff) | |
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).
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/rz_mail.py | 4 |
1 files changed, 2 insertions, 2 deletions
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('/') |
