django-celery-email is an asynchronous email backend for Django that integrates with Celery to send emails in the background. This offloads email sending from the request-response cycle, improving web application responsiveness. The current version is 3.0.0, focusing on compatibility with modern Django and Python versions.
pip install django-celery-emailVerified import paths — ran on the pinned version, not inferred.
To use django-celery-email, first ensure Celery and its broker (e.g., Redis) are installed and configured. Then, add 'django_celery_email' to `INSTALLED_APPS` and set `EMAIL_BACKEND` in your Django settings to `django_celery_email.backends.CeleryEmailBackend`. Emails sent via `django.core.mail.send_mail` or similar will then be processed asynchronously by Celery workers.
Upgrade your Django installation to 3.2 or higher and Python to 3.8 or higher before upgrading to django-celery-email 3.x.
Remove `recipient_list_split_size` from your `CELERY_EMAIL_TASK_CONFIG` or any custom task configurations. Adapt any custom task definitions to the new simplified arguments.
Ensure you have Celery and a broker (e.g., Redis, RabbitMQ) properly installed and configured in your Django project, and that your Celery worker process is running and accessible.
Set `CELERY_EMAIL_BACKEND = 'your.custom.email.backend.Path'` in your `settings.py` if you need Celery to use a specific non-default email backend.