Open prafulbagai708 opened 4 years ago
Any updates on it?
+1
You need to add the following to settings.py
# https://anymail.readthedocs.io/en/stable/installation/#installing-anymail
INSTALLED_APPS += ["anymail"] # noqa F405
# https://docs.djangoproject.com/en/dev/ref/settings/#email-backend
# EMAIL_BACKEND = "anymail.backends.amazon_ses.EmailBackend"
# Use Celery for sending emails
EMAIL_BACKEND = "djcelery_email.backends.CeleryEmailBackend"
# https://github.com/pmclanahan/django-celery-email
INSTALLED_APPS += ["djcelery_email"] # noqa F405
# Make celery delegate the actual email sending to AWS SES
CELERY_EMAIL_BACKEND = "anymail.backends.amazon_ses.EmailBackend"
Please note that EMAIL_BACKEND
was changed from anymail.backends.amazon_ses.EmailBackend
to djcelery_email.backends.CeleryEmailBackend
. This makes Django use celery workers for all email tasks. To make sure the actual email sending task is handled by anymail.backends.amazon_ses.EmailBackend
(SES) change the CELERY_EMAIL_BACKEND
to anymail.backends.amazon_ses.EmailBackend
You don't need to use anymail
for this. Just set the following:-
EMAIL_BACKEND = 'djcelery_email.backends.CeleryEmailBackend' CELERY_EMAIL_BACKEND = 'django_ses.SESBackend'
The question is self-explanatory! I've integrated django-celery-email. Now I want to send an email using Amazon SES, to be specific using https://github.com/django-ses/django-ses/ . How can I do that?