From 87dc39857d78078064df83de6e32d78b76863746 Mon Sep 17 00:00:00 2001 From: jordan Date: Mon, 11 Jun 2012 11:31:15 +0000 Subject: [PATCH 1/1] follow RFC 822 AFAIR when sending emails git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1271 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- forum/utils/mail.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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: -- 2.39.5