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
1 changed files with 8 additions and 2 deletions

View File

@ -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