Ticket #4707: mail_attachments_1.diff
File mail_attachments_1.diff, 1.3 KB (added by , 17 years ago) |
---|
-
django/core/mail.py
347 347 messages = [EmailMessage(subject, message, sender, recipient) for subject, message, sender, recipient in datatuple] 348 348 return connection.send_messages(messages) 349 349 350 def mail_admins(subject, message, fail_silently=False ):350 def mail_admins(subject, message, fail_silently=False, attachments=None): 351 351 "Sends a message to the admins, as defined by the ADMINS setting." 352 352 EmailMessage(settings.EMAIL_SUBJECT_PREFIX + subject, message, 353 353 settings.SERVER_EMAIL, [a[1] for a in 354 settings.ADMINS] ).send(fail_silently=fail_silently)354 settings.ADMINS],attachments=attachments).send(fail_silently=fail_silently) 355 355 356 def mail_managers(subject, message, fail_silently=False ):356 def mail_managers(subject, message, fail_silently=False, attachments=None): 357 357 "Sends a message to the managers, as defined by the MANAGERS setting." 358 358 EmailMessage(settings.EMAIL_SUBJECT_PREFIX + subject, message, 359 359 settings.SERVER_EMAIL, [a[1] for a in 360 settings.MANAGERS] ).send(fail_silently=fail_silently)360 settings.MANAGERS],attachments=attachments).send(fail_silently=fail_silently) 361 361