Skip to content

Commit

Permalink
Fixed #6139 -- When sending email, made sure that the "to" and "bcc" …
Browse files Browse the repository at this point in the history
…sequences have the same type before concatenating.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6953 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
malcolmt committed Dec 19, 2007
1 parent a35ca60 commit c506f45
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions django/core/mail.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -209,8 +209,14 @@ def __init__(self, subject='', body='', from_email=None, to=None, bcc=None,
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
Expand Down

0 comments on commit c506f45

Please sign in to comment.