celery.utils.mail

    exception celery.utils.mail.SendmailWarning

    Problem happened while sending the email message.

    class celery.utils.mail.Message(to=None, sender=None, subject=None, body=None, charset=’us-ascii’)[源代码]

    class celery.utils.mail.Mailer(host=’localhost’, port=0, user=None, password=None, timeout=2, use_ssl=False, use_tls=False)

    • send(message, fail_silently=False, \*kwargs*)[源代码]

    class celery.utils.mail.ErrorMail(task, \*kwargs*)

    Defines how and when task error e-mails should be sent.

    subject and are format strings which are passed a context containing the following keys:

    • name

    • UUID of the task.

    • args

    • kwargs

      Keyword arguments.

    • traceback

    • Worker nodename.

    • EMAIL_SIGNATURE_SEP = ‘— ‘

    • format_body(context)[源代码]

    • format_subject(context)

    • send(context, exc, fail_silently=True)[源代码]

    • should_send(context, exc)

      Return true or false depending on if a task error mail should be sent for this type of error.

    • Format string used to generate error email subjects.