Django

Code

Show
Ignore:
Timestamp:
07/07/08 20:56:01 (1 month ago)
Author:
adrian
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/core/mail.py

    r7350 r7864  
    206206        """ 
    207207        if to: 
     208            assert not isinstance(to, basestring), '"to" argument must be a list or tuple' 
    208209            self.to = list(to) 
    209210        else: 
    210211            self.to = [] 
    211212        if bcc: 
     213            assert not isinstance(bcc, basestring), '"bcc" argument must be a list or tuple' 
    212214            self.bcc = list(bcc) 
    213215        else: