[sysadmin-bin] ftpadmin: encode the from address to fix bug 652481



commit 9cb6d5323a4903c329148115dc61cc2aabc17d6e
Author: Olav Vitters <olav vitters nl>
Date:   Tue Jun 14 13:04:11 2011 +0200

    ftpadmin: encode the from address to fix bug 652481

 ftpadmin |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/ftpadmin b/ftpadmin
index 5f4c6ff..5e414f6 100755
--- a/ftpadmin
+++ b/ftpadmin
@@ -22,6 +22,7 @@ import errno
 import glob
 import string
 from email.mime.text import MIMEText
+from email.header import Header
 import json
 try:
     from cStringIO import StringIO
@@ -1170,7 +1171,7 @@ See http://live.gnome.org/MaintainersCorner#doap""";
         """Send an email"""
         msg = MIMEText(contents, _charset='utf-8')
         msg['Subject'] = subject
-        msg['From'] = '"%s" <install-module master gnome org>' % self.who
+        msg['From'] = Header(u'"%s" <install-module master gnome org>' % self.who)
         msg['To'] = to
         if headers is not None:
             for k, v in headers.iteritems():



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]