Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit c506f4574a8df61c687ebadab5e0d34da086f586 1 parent a35ca60
@malcolmt malcolmt authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 django/core/mail.py
View
10 django/core/mail.py
@@ -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
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

0 comments on commit c506f45

Please sign in to comment.
Something went wrong with that request. Please try again.