1
0
mirror of https://github.com/django/django.git synced 2024-12-23 09:36:06 +00:00

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:
Malcolm Tredinnick 2007-12-19 04:51:35 +00:00
parent a35ca605d6
commit c506f4574a

View File

@ -209,8 +209,14 @@ class EmailMessage(object):
bytestrings). The SafeMIMEText class will handle any necessary encoding
conversions.
"""
self.to = to or []
self.bcc = bcc or []
if to:
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.subject = subject
self.body = body