Ticket #6840: 6840_mail_cc.diff
File 6840_mail_cc.diff, 1.5 KB (added by , 17 years ago) |
---|
-
django/core/mail.py
189 189 multipart_subtype = 'mixed' 190 190 encoding = None # None => use settings default 191 191 192 def __init__(self, subject='', body='', from_email=None, to=None, bcc=None,192 def __init__(self, subject='', body='', from_email=None, to=None, cc=None, bcc=None, 193 193 connection=None, attachments=None, headers=None): 194 194 """ 195 195 Initialise a single email message (which can be sent to multiple … … 203 203 self.to = list(to) 204 204 else: 205 205 self.to = [] 206 if cc: 207 self.cc = list(cc) 208 else: 209 self.cc = [] 206 210 if bcc: 207 211 self.bcc = list(bcc) 208 212 else: … … 237 241 msg['To'] = ', '.join(self.to) 238 242 msg['Date'] = formatdate() 239 243 msg['Message-ID'] = make_msgid() 244 if self.cc: 245 msg['Cc'] = ', '.join(self.cc) 240 246 if self.bcc: 241 247 msg['Bcc'] = ', '.join(self.bcc) 242 248 for name, value in self.extra_headers.items(): … … 248 254 Returns a list of all recipients of the email (includes direct 249 255 addressees as well as Bcc entries). 250 256 """ 251 return self.to + self. bcc257 return self.to + self.cc + self.bcc 252 258 253 259 def send(self, fail_silently=False): 254 260 """Send the email message."""