Added Celery task for queued email sending.
Upon IOError or OSError (which includes SMTP protocol errors) the mail sending task is retried after MAIL_RETRY seconds. It is retried three times (default setting of Celery) only.
This commit is contained in:
@@ -230,3 +230,11 @@ DEFAULT_LOCALE = 'en_US'
|
||||
# never show the site in English.
|
||||
SUPPORT_ENGLISH = True
|
||||
|
||||
|
||||
# Mail options, see pillar.celery.email_tasks.
|
||||
SMTP_HOST = 'localhost'
|
||||
SMTP_PORT = 2525
|
||||
SMTP_TIMEOUT = 30 # timeout in seconds, https://docs.python.org/3/library/smtplib.html#smtplib.SMTP
|
||||
MAIL_RETRY = 180 # in seconds, delay until trying to send an email again.
|
||||
MAIL_DEFAULT_FROM_NAME = 'Blender Cloud'
|
||||
MAIL_DEFAULT_FROM_ADDR = 'cloudsupport@localhost'
|
||||
|
Reference in New Issue
Block a user