Skip to main content

Queening and storing EMAIL_BACKEND for django.

https://img.shields.io/pypi/v/django-email-queue.svg https://img.shields.io/travis/wooyek/django-email-queue.svg Documentation Status Coveralls.io coverage CodeCov coverage Maintainability License Tweet about this project https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg

No change in django send_messages usage to get message storing

You don’t have to change the way you send messages, this app will plugin into the usual django plumbing.

This way all the email send though django EMAIL_BACKEND will get stored for auditing.

No overhead infrastructure

You don’t have to setup overhead infrastructure (e.g. celery, redis and rabbitmq) just to send emails asynchronously. You can use a simple worker that will send queued emails.

When you get big and having a MQ and all that is a good choice, all you have to to is set EMAIL_QUEUE_EMAIL_BACKEND to ‘djcelery_email.backends.CeleryEmailBackend’. This way you get message storing for auditing and will use pro setup for asynchronously ran tasks.

Quickstart

Install Django email queue:

pip install django-email-queue

This is a plugin replacement for your current EMAIL_BACKEND. You’ll still use it to send actual messages, but before them they’ll get stored and queued in models visible from admin panel.

EMAIL_BACKEND = 'django_email_queue.backends.EmailBackend'
EMAIL_QUEUE_EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'

INSTALLED_APPS = [
    ...
    'django_email_queue.apps.DjangoEmailQueueConfig',
]

Now you have a few options to setup queue processing

  1. Run django_email_queue.worker from terminal to continuously send emails:

python -m django_email_queue.worker

Set EMAIL_QUEUE_SLEEP_TIME to number of settings to sleep between runs.

  1. Run django command to process queue and exit:

python manage.py send_queued_messages
  1. Manually from django admin for :

Deploy Django Opt-out example project to Heroku

Running Tests

Does the code actually work?

$ pipenv install --dev
$ pipenv shell
$ tox

We recommend using pipenv but a legacy approach to creating virtualenv and installing requirements should also work. Please install requirements/development.txt to setup virtual env for testing and development.

Credits

This package was created with Cookiecutter and the wooyek/cookiecutter-django-app project template.

History

0.9.17 (2018-01-02)

  • First release on PyPI.

Metadata

Release files for django-email-queue 0.23.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-email-queue 0.23.0
File Size Uploaded Provenance Actions
django-email-queue-0.23.0.tar.gz 122.1 kB Without provenance Details for django-email-queue-0.23.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-email-queue 0.23.0
File Interpreter ABI Platform Actions
django_email_queue-0.23.0-py2.py3-none-any.whl Python 2, Python 3 none any Details for django_email_queue-0.23.0-py2.py3-none-any.whl

Total release size: 138.0 kB

Release files / django-email-queue-0.23.0.tar.gz

Download URL django-email-queue-0.23.0.tar.gz
Size 122.1 kB
Tags Source
SHA-256 checksum
How to use checksums
74c2470f61b4817ac061ffc3f23487492efa0494d664fd6ef557849a7c9e54c0
BLAKE2b-256 checksum
How to use checksums
c5ab848587596c6f5be1ac6d8dbcc3f3b46a1d9205cb626e04f226a1d261e79c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / django_email_queue-0.23.0-py2.py3-none-any.whl

Download URL django_email_queue-0.23.0-py2.py3-none-any.whl
Size 15.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
46dbf9b959e95c2737929ef569f8c052e2fa1c38af9eb4f1a400fb652729bf32
BLAKE2b-256 checksum
How to use checksums
074890125e8e6f667036c1a8c91e43fd87081f58ded4f1af6f90fd14805bc3f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-email-queue 0.23.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page