Author: adrian
Date: 2008-07-07 20:56:01 -0500 (Mon, 07 Jul 2008)
New Revision: 7864

Modified:
   django/trunk/django/core/mail.py
Log:
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

Modified: django/trunk/django/core/mail.py
===================================================================
--- django/trunk/django/core/mail.py    2008-07-08 01:49:50 UTC (rev 7863)
+++ django/trunk/django/core/mail.py    2008-07-08 01:56:01 UTC (rev 7864)
@@ -205,10 +205,12 @@
         conversions.
         """
         if to:
+            assert not isinstance(to, basestring), '"to" argument must be a 
list or tuple'
             self.to = list(to)
         else:
             self.to = []
         if bcc:
+            assert not isinstance(bcc, basestring), '"bcc" argument must be a 
list or tuple'
             self.bcc = list(bcc)
         else:
             self.bcc = []


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to