diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-12-19 04:51:35 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-12-19 04:51:35 +0000 |
| commit | c506f4574a8df61c687ebadab5e0d34da086f586 (patch) | |
| tree | d7d526a5239c8a045d9d367e15a960eafb0e0f04 | |
| parent | a35ca605d62d1b97eb595dcaa27b0904a0fe2182 (diff) | |
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
| -rw-r--r-- | django/core/mail.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/django/core/mail.py b/django/core/mail.py index 77ab8007e6..e408393d96 100644 --- a/django/core/mail.py +++ b/django/core/mail.py @@ -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 |
