[Zope-Checkins] CVS: Zope/lib/python/Products/MailHost - MailHost.py:1.74.6.6
Andreas Jung
andreas@andreas-jung.com
Mon, 7 Jul 2003 12:12:41 -0400
Update of /cvs-repository/Zope/lib/python/Products/MailHost
In directory cvs.zope.org:/tmp/cvs-serv8000/lib/python/Products/MailHost
Modified Files:
Tag: Zope-2_6-branch
MailHost.py
Log Message:
- Collector #893: Mailhost: munge_header has been broken for addresses
containing the recipients full name
=== Zope/lib/python/Products/MailHost/MailHost.py 1.74.6.5 => 1.74.6.6 ===
--- Zope/lib/python/Products/MailHost/MailHost.py:1.74.6.5 Tue Mar 4 11:29:53 2003
+++ Zope/lib/python/Products/MailHost/MailHost.py Mon Jul 7 12:12:04 2003
@@ -183,7 +183,7 @@
if mto:
if isinstance(mto, types.StringType):
- mto=map(lambda x:x.strip(), mto.split(','))
+ mto = [rfc822.dump_address_pair(addr) for addr in rfc822.AddressList(mto) ]
if not mo.getheader('To'):
mo['To'] = ','.join(mto)
else:
@@ -191,7 +191,7 @@
for header in ('To', 'Cc', 'Bcc'):
v = mo.getheader(header)
if v:
- mto += [addr.strip() for addr in v.split(',')]
+ mto += [rfc822.dump_address_pair(addr) for addr in rfc822.AddressList(v)]
if not mto:
raise MailHostError, "No message recipients designated"