Ticket #4707: mail_attachments_1.diff

File mail_attachments_1.diff, 1.3 KB (added by Thejaswi Puthraya, 10 years ago)

corrected the typos in the previous diff

  • django/core/mail.py

    347347    messages = [EmailMessage(subject, message, sender, recipient) for subject, message, sender, recipient in datatuple]
    348348    return connection.send_messages(messages)
    350 def mail_admins(subject, message, fail_silently=False):
     350def mail_admins(subject, message, fail_silently=False, attachments=None):
    351351    "Sends a message to the admins, as defined by the ADMINS setting."
    352352    EmailMessage(settings.EMAIL_SUBJECT_PREFIX + subject, message,
    353353            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)
    356 def mail_managers(subject, message, fail_silently=False):
     356def mail_managers(subject, message, fail_silently=False, attachments=None):
    357357    "Sends a message to the managers, as defined by the MANAGERS setting."
    358358    EmailMessage(settings.EMAIL_SUBJECT_PREFIX + subject, message,
    359359            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)
Back to Top