Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Malcolm Tredinnick authored

Showing 1 changed file with 8 additions and 2 deletions. Show diff stats Hide diff stats

  1. 10  django/core/mail.py
10  django/core/mail.py
@@ -209,8 +209,14 @@ def __init__(self, subject='', body='', from_email=None, to=None, bcc=None,
209 209
         bytestrings). The SafeMIMEText class will handle any necessary encoding
210 210
         conversions.
211 211
         """
212  
-        self.to = to or []
213  
-        self.bcc = bcc or []
  212
+        if to:
  213
+            self.to = list(to)
  214
+        else:
  215
+            self.to = []
  216
+        if bcc:
  217
+            self.bcc = list(bcc)
  218
+        else:
  219
+            self.bcc = []
214 220
         self.from_email = from_email or settings.DEFAULT_FROM_EMAIL
215 221
         self.subject = subject
216 222
         self.body = body

0 notes on commit c506f45

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