📨 Django mails. Supercharged. https://pypi.org/project/django-nitro-mailer/
  • Python 99.2%
  • HTML 0.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Camila 8824d1ab03
All checks were successful
Tests / Ruff Linter (push) Successful in 6s
Tests / Ruff Formatter (push) Successful in 6s
PyPI Publish / Build (push) Successful in 17s
Tests / Pytest (Python 3.10, Django 5.2) (push) Successful in 13s
Tests / Pytest (Python 3.11, Django 5.2) (push) Successful in 12s
Tests / Pytest (Python 3.12, Django 5.2) (push) Successful in 12s
Tests / Pytest (Python 3.13, Django 5.2) (push) Successful in 13s
Tests / Pytest (Python 3.14, Django 5.2) (push) Successful in 16s
Tests / Pytest (Python 3.12, Django 6.0) (push) Successful in 13s
Tests / Pytest (Python 3.13, Django 6.0) (push) Successful in 13s
Tests / Pytest (Python 3.14, Django 6.0) (push) Successful in 14s
Tests / Pytest (Python 3.12, Django 6.1) (push) Successful in 13s
Tests / Pytest (Python 3.13, Django 6.1) (push) Successful in 14s
Tests / Pytest (Python 3.14, Django 6.1) (push) Successful in 14s
chore: release version 0.3.1
2026-11-06 08:53:08 +01:00
.github/workflows chore: support Python 3.10+ (previously only 3.11+) 2026-11-05 23:25:41 +01:00
django_nitro_mailer feat: support Django MAILERS transport aliases 2026-11-06 08:45:56 +01:00
tests feat: support Django MAILERS transport aliases 2026-11-06 08:45:56 +01:00
.gitignore docs: Build and deploy docs on GitHub Pages 2024-10-19 09:44:02 +02:00
dev_settings.py chore: Update dependencies and update code style 2024-10-18 20:33:40 +02:00
django-nitro-mailer-logo.png feat: Add Python 3.14 to supported versions 2026-05-14 19:56:23 +02:00
LICENSE Initial commit 2024-03-28 22:14:17 +01:00
manage.py chore: Update dependencies and update code style 2024-10-18 20:33:40 +02:00
MANIFEST.in fix: Make the admin template work in other apps 2025-03-22 12:09:48 +01:00
pyproject.toml chore: release version 0.3.1 2026-11-06 08:53:08 +01:00
README.md feat: support Django MAILERS transport aliases 2026-11-06 08:45:56 +01:00
urls.py feat: Create structure for reusable Django app development 2024-05-18 14:06:41 +02:00
uv.lock chore: release version 0.3.1 2026-11-06 08:53:08 +01:00
zensical.toml feat: Replace MkDocs with Zensical 2026-03-26 23:01:40 +01:00

📨 Django mails. Supercharged.

PyPI - Version

Overview

django-nitro-mailer is a pluggable Django app that provides extra email reliability and observability in form of email backends that can be used with Django's built-in functions and other email backend.

django-nitro-mailer by itself does not provide a way to send emails, but it puts an extra layer before the email backend to provide extra features like:

  • priority queueing
  • retrying failed emails
  • logging and traces
  • email throttling
  • sending messages through the admin panel

Requirements

  • Python >=3.10, <3.15
  • Django >=5.2, <7.0

Installation

Install the package using pip:

$ pip install django-nitro-mailer

Usage

  1. Add django_nitro_mailer to your INSTALLED_APPS in your settings.py:
INSTALLED_APPS = [
    ...
    "django_nitro_mailer",
    ...
]
  1. Run python manage.py migrate to create the necessary tables.

  2. Change the EMAIL_BACKEND setting in your settings.py to use the desired backend:

  • Database Backend: Store emails in the database and send them asynchronously. Requires sending a cron job or some other scheduled task to send the emails.
EMAIL_BACKEND = "django_nitro_mailer.backends.DatabaseBackend"
  • Sync Backend: Send emails synchronously. Does not provide the reliability that the database backend provides, but still provides the logging and throttling features.
EMAIL_BACKEND = "django_nitro_mailer.backends.SyncBackend"

The emails are delivered using the backend from the NITRO_EMAIL_BACKEND setting (SMTP by default).

Django 6.1+ MAILERS

With Django 6.1 MAILERS, use a django-nitro-mailer backend as the default mailer and point NITRO_EMAIL_MAILER at a separate mailer alias that does the actual delivery:

import os

MAILERS = {
    "default": {"BACKEND": "django_nitro_mailer.backends.DatabaseBackend"},  # or SyncBackend
    "smtp": {
        "BACKEND": "django.core.mail.backends.smtp.EmailBackend",
        "OPTIONS": {
            "host": "smtp.example.com",
            "port": 587,
            "username": os.environ["EMAIL_HOST_USER"],
            "password": os.environ["EMAIL_HOST_PASSWORD"],
            "use_tls": True,
        },
    },
}
NITRO_EMAIL_MAILER = "smtp"

NITRO_EMAIL_MAILER takes precedence over NITRO_EMAIL_BACKEND and must not point to a django-nitro-mailer backend. When MAILERS is configured, one of the two settings is required. The django-nitro-mailer backends themselves take no OPTIONS.

Documentation

Documentation is available here.

License

django-nitro-mailer is under the terms of the MIT License, following all clarifications stated in the license file.