From d940a8a2e01401ebf6a41e8719fcc15f2a3391a2 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Nov 15 2016 15:07:58 +0000 Subject: Also encode the subject lines to display properly non-ascii ticket/PR titles --- diff --git a/pagure/lib/notify.py b/pagure/lib/notify.py index b29871a..93b8328 100644 --- a/pagure/lib/notify.py +++ b/pagure/lib/notify.py @@ -215,7 +215,8 @@ def send_email(text, subject, to_mail, for mailto in to_mail.split(','): msg = MIMEText(text.encode('utf-8'), 'plain', 'utf-8') - msg['Subject'] = '[%s] %s' % (subject_tag, subject) + msg['Subject'] = header = Header( + '[%s] %s' % (subject_tag, subject), 'utf-8') msg['From'] = from_email if mail_id: