From: jordan Date: Mon, 11 Jun 2012 11:31:15 +0000 (+0000) Subject: follow RFC 822 AFAIR when sending emails X-Git-Tag: live~46 X-Git-Url: https://git.openstreetmap.org/osqa.git/commitdiff_plain/87dc39857d78078064df83de6e32d78b76863746 follow RFC 822 AFAIR when sending emails git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1271 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- diff --git a/forum/utils/mail.py b/forum/utils/mail.py index 4ab2a69..370e0f9 100644 --- a/forum/utils/mail.py +++ b/forum/utils/mail.py @@ -69,8 +69,7 @@ def create_and_send_mail_messages(messages): msgRoot['Subject'] = Header(subject, 'utf-8') msgRoot['From'] = sender - to = Header(recipient.username, 'utf-8') - to.append('<%s>' % recipient.email) + to = Header(u"%s <%s>" % (recipient.username, recipient.email), 'utf-8') msgRoot['To'] = to if reply_to: