From baafa119404299ebcc97aef8e97d5510dad8ae73 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Nov 15 2016 15:07:58 +0000 Subject: Encode the from email to UTF-8 This ensure email having non-ascii characters are properly encoded and displayed in the email clients. Fixes https://pagure.io/pagure/issue/1496 --- diff --git a/pagure/lib/notify.py b/pagure/lib/notify.py index 49d1290..45bb3d2 100644 --- a/pagure/lib/notify.py +++ b/pagure/lib/notify.py @@ -197,6 +197,7 @@ def send_email(text, subject, to_mail, 'FROM_EMAIL', 'pagure@fedoraproject.org') if user_from: from_email = '%s <%s>' % (user_from, from_email) + from_email = from_email.encode('utf-8') if not pagure.APP.config.get('EMAIL_SEND', True): print '******EMAIL******'