changeset 58:285ba792d278

use Header() for From: and To:, too imported from: moin--main--1.5--patch-60
author Thomas Waldmann <tw@waldmann-edv.de>
date Fri, 30 Sep 2005 17:44:41 +0000
parents 546541209681
children 26270b13f6df
files MoinMoin/i18n/mail_i18n-maintainers.py MoinMoin/util/mail.py docs/CHANGES
diffstat 3 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/i18n/mail_i18n-maintainers.py	Thu Sep 29 21:04:19 2005 +0000
+++ b/MoinMoin/i18n/mail_i18n-maintainers.py	Fri Sep 30 17:44:41 2005 +0000
@@ -41,8 +41,8 @@
     
     # Create a text/plain message
     msg = MIMEText(text, 'plain', charset)
-    msg['From'] = mfrom
-    msg['To'] = ', '.join(mto)
+    msg['From'] = Header(mfrom)
+    msg['To'] = Header(', '.join(mto))
     msg['Subject'] = Header(subject, charset)
     msg['Date'] = formatdate()
     
--- a/MoinMoin/util/mail.py	Thu Sep 29 21:04:19 2005 +0000
+++ b/MoinMoin/util/mail.py	Fri Sep 30 17:44:41 2005 +0000
@@ -35,6 +35,7 @@
     _ = request.getText
     cfg = request.cfg    
     mail_from = kw.get('mail_from', '') or cfg.mail_from
+    mail_from = Header(mail_from)
     subject = subject.encode(config.charset)    
 
     # Create a text/plain body using CRLF (see RFC2822)
--- a/docs/CHANGES	Thu Sep 29 21:04:19 2005 +0000
+++ b/docs/CHANGES	Fri Sep 30 17:44:41 2005 +0000
@@ -225,6 +225,8 @@
       dynamically. The fix is not backward compatible with older plugins.
     * Fix chart action, returns a page with error message when chart
       can not be created.
+    * use Header() to enable correct processing of non-ASCII From: and To: in
+      generated emails
     
     
 Version 1.4: