]> git.openstreetmap.org Git - osqa.git/commitdiff
follow RFC 822 AFAIR when sending emails
authorjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Mon, 11 Jun 2012 11:31:15 +0000 (11:31 +0000)
committerjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Mon, 11 Jun 2012 11:31:15 +0000 (11:31 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1271 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/utils/mail.py

index 4ab2a695618902c031cf27ce8a707a3608111d27..370e0f9c9259dd20e040f6126c9ed7810c504c05 100644 (file)
@@ -69,8 +69,7 @@ def create_and_send_mail_messages(messages):
             msgRoot['Subject'] = Header(subject, 'utf-8')
             msgRoot['From'] = sender
 
             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:
             msgRoot['To'] = to
 
             if reply_to: