django-q-email
is a reusable Django app for queuing the sending of email with Django Q.
Install the latest version with pip:
$ pip install django-q-email
Then in settings.py
:
EMAIL_BACKEND = 'django_q_email.backends.DjangoQBackend'
Then send email in the normal way, as per the Django email docs, and they will be sent in a background task. See Django Q for more information](https://github.com/Koed00/django-q).
DJANGO_Q_EMAIL_BACKEND
- Backend used in the background task (default: django.core.mail.backends.smtp.EmailBackend
)
DJANGO_Q_EMAIL_USE_DICTS
- Store Python dictionaries instead of pickled EmailMessage
and EmailMultiAlternatives
(default: True
)
DJANGO_Q_EMAIL_ERROR_HANDLER
- Optional function to be called if sending fails (called as DJANGO_Q_EMAIL_ERROR_HANDLER(email_message, exception)
)
- Check the open issues or open a new issue to start a discussion around your feature idea or the bug you found
- Fork the repository and make your changes
- Create a new pull request