mirror of https://github.com/django/django.git
Fixed #6139 -- When sending email, made sure that the "to" and "bcc" sequences have the same type before concatenating.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6953 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
a35ca605d6
commit
c506f4574a
|
@ -209,8 +209,14 @@ class EmailMessage(object):
|
||||||
bytestrings). The SafeMIMEText class will handle any necessary encoding
|
bytestrings). The SafeMIMEText class will handle any necessary encoding
|
||||||
conversions.
|
conversions.
|
||||||
"""
|
"""
|
||||||
self.to = to or []
|
if to:
|
||||||
self.bcc = bcc or []
|
self.to = list(to)
|
||||||
|
else:
|
||||||
|
self.to = []
|
||||||
|
if bcc:
|
||||||
|
self.bcc = list(bcc)
|
||||||
|
else:
|
||||||
|
self.bcc = []
|
||||||
self.from_email = from_email or settings.DEFAULT_FROM_EMAIL
|
self.from_email = from_email or settings.DEFAULT_FROM_EMAIL
|
||||||
self.subject = subject
|
self.subject = subject
|
||||||
self.body = body
|
self.body = body
|
||||||
|
|
Loading…
Reference in New Issue