From c506f4574a8df61c687ebadab5e0d34da086f586 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Wed, 19 Dec 2007 04:51:35 +0000 Subject: [PATCH] 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 --- django/core/mail.py | 10 ++++++++-- 1 file 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