Ticket #4707: mail_attachements.diff
File mail_attachements.diff, 1.3 KB (added by , 17 years ago) |
---|
-
django/core/mail.py
288 288 messages = [EmailMessage(subject, message, sender, recipient) for subject, message, sender, recipient in datatuple] 289 289 return connection.send_messages(messages) 290 290 291 def mail_admins(subject, message, fail_silently=False ):291 def mail_admins(subject, message, fail_silently=False, attachements=None): 292 292 "Sends a message to the admins, as defined by the ADMINS setting." 293 293 EmailMessage(settings.EMAIL_SUBJECT_PREFIX + subject, message, 294 294 settings.SERVER_EMAIL, [a[1] for a in 295 settings.ADMINS] ).send(fail_silently=fail_silently)295 settings.ADMINS], attachements=attachements).send(fail_silently=fail_silently) 296 296 297 def mail_managers(subject, message, fail_silently=False ):297 def mail_managers(subject, message, fail_silently=False, attachements=None): 298 298 "Sends a message to the managers, as defined by the MANAGERS setting." 299 299 EmailMessage(settings.EMAIL_SUBJECT_PREFIX + subject, message, 300 300 settings.SERVER_EMAIL, [a[1] for a in 301 settings.MANAGERS] ).send(fail_silently=fail_silently)301 settings.MANAGERS], attachements=attachements).send(fail_silently=fail_silently) 302 302