[sysadmin-bin] ftpadmin: correctly encode from: address
- From: Olav Vitters <ovitters src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] ftpadmin: correctly encode from: address
- Date: Wed, 15 Jun 2011 08:53:59 +0000 (UTC)
commit 8f928e17cdeace2132a4ac79bd756f58d54358e9
Author: Olav Vitters <olav vitters nl>
Date: Wed Jun 15 10:53:54 2011 +0200
ftpadmin: correctly encode from: address
ftpadmin | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/ftpadmin b/ftpadmin
index c999cf4..136bbdd 100755
--- a/ftpadmin
+++ b/ftpadmin
@@ -23,6 +23,7 @@ import glob
import string
from email.mime.text import MIMEText
from email.header import Header
+from email.utils import formataddr
import json
try:
from cStringIO import StringIO
@@ -1172,7 +1173,7 @@ See http://live.gnome.org/MaintainersCorner#doap"""
"""Send an email"""
msg = MIMEText(contents, _charset='utf-8')
msg['Subject'] = subject
- msg['From'] = Header(u'"%s" <install-module master gnome org>' % self.who)
+ msg['From'] = formataddr((Header(self.who.decode('utf-8')).encode(), 'install-module master gnome org'))
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]