Commit c52a586a authored by Arnaud Fontaine's avatar Arnaud Fontaine

WIP

parent 14abf777
...@@ -8,7 +8,7 @@ from __future__ import absolute_import ...@@ -8,7 +8,7 @@ from __future__ import absolute_import
from past.builtins import basestring from past.builtins import basestring
from builtins import object from builtins import object
import os import os
import rfc822 import email.utils
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from DateTime import DateTime from DateTime import DateTime
...@@ -148,8 +148,8 @@ class BaseMailTemplate(object): ...@@ -148,8 +148,8 @@ class BaseMailTemplate(object):
v = values.get(key) v = values.get(key)
if v: if v:
if isinstance(v, basestring): if isinstance(v, basestring):
v = [rfc822.dump_address_pair(addr) for addr \ v = [email.utils.formataddr(addr) for addr \
in rfc822.AddressList(v)] in email.utils.getaddresses([v])]
to_addrs += tuple(v) to_addrs += tuple(v)
self._send(values['mfrom'], to_addrs, msg) self._send(values['mfrom'], to_addrs, msg)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment