Fixed #7655 -- Added two assertions to mail.py to help people debug a common problem (sending strings instead of lists/tuples for 'to' or 'bcc'). Thanks, guettli
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7864 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
b0d380376c
commit
f19284b85a
|
@ -205,10 +205,12 @@ class EmailMessage(object):
|
||||||
conversions.
|
conversions.
|
||||||
"""
|
"""
|
||||||
if to:
|
if to:
|
||||||
|
assert not isinstance(to, basestring), '"to" argument must be a list or tuple'
|
||||||
self.to = list(to)
|
self.to = list(to)
|
||||||
else:
|
else:
|
||||||
self.to = []
|
self.to = []
|
||||||
if bcc:
|
if bcc:
|
||||||
|
assert not isinstance(bcc, basestring), '"bcc" argument must be a list or tuple'
|
||||||
self.bcc = list(bcc)
|
self.bcc = list(bcc)
|
||||||
else:
|
else:
|
||||||
self.bcc = []
|
self.bcc = []
|
||||||
|
|
Loading…
Reference in New Issue