django-post_office
A Django app to monitor and send mail asynchronously, complete with template support.
What it is and what it does
Django Post Office is a Django app that decouples email sending from your request/response cycle by queuing messages to the database and processing them asynchronously. It acts as a custom email backend, intercepting Django's standard mail operations and storing them for later delivery via a management command. This prevents slow email operations from blocking web requests.
The package supports database-backed email templates with Django template syntax, multilingual variants, HTML content with inlined images, attachments, scheduling, and priority levels. It uses nh3 for HTML sanitization in the Django admin interface. Configuration involves adding the app to INSTALLED_APPS, running migrations, and setting EMAIL_BACKEND to the package's backend.
Use it for:
- Queue transactional emails (password resets, order confirmations) without blocking the web request.
- Send bulk emails on a schedule using database templates and the management command.
- Manage multilingual email campaigns by creating translated template variants and specifying language at send time.
- Attach files or inline images in HTML emails with full control over MIME types and content.
- Integrate email sending into async task workers for distributed processing of large email volumes.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Django Post Office queues and sends emails asynchronously with template support, HTML rendering, and database-backed scheduling.
Yes. The package is production-stable (Development Status 5), actively maintained, has no known vulnerabilities, and solves a common Django problem—asynchronous email delivery with minimal setup friction. Install it if you need to queue emails, use templates, or avoid blocking requests on mail operations.
Install
django-post-office on PyPI
pip
pip install django-post-officeuv
uv add django-post-officepoetry
poetry add django-post-officeInstalling django-post_office
Before you install
Low friction install with only two runtime dependencies (django and nh3). The package is actively maintained with a recent release and no known vulnerabilities.
License in practice
MIT license permits commercial and private use with minimal restrictions—suitable for most projects.
Quickstart
pip install django-post_office
# Add to INSTALLED_APPS and set EMAIL_BACKEND in settings.py
from django.core.mail import send_mail
# Emails are now queued via the configured backend
# Run the management command to process queued emails
# python manage.py send_queued_mail
Requires Django >= 4.2 and Python >= 3.9. Must run database migrations and configure Django settings.
Verify before relying
- Performance characteristics when handling millions of emails—exact throughput or latency benchmarks not specified.
- Whether multiprocessing/threading parallelism is automatic or requires explicit configuration.
- Compatibility with specific task queues beyond the stated 'works well with' claim.
- Exact behavior of render_on_delivery option and space savings in practice.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — nh3, django |
| Maintenance | actively maintained — 120 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 130,227/month — #11,649 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_post_office-3.11.2-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
django-celery-emailRoutes Django email sending through Celery task…
permissive · top 15,000 on PyPI
django-multi-email-fieldProvides Django model and form fields to store…
unclear · top 15,000 on PyPI
django-sesA Django email backend that routes outgoing…
permissive · top 5,000 on PyPI
django-templated-mailSends Django emails using template files…
permissive · top 15,000 on PyPI
postmarkerPostmarker is a Python client library for the…
permissive · top 5,000 on PyPI
fastapi-mailSends emails and attachments asynchronously…
permissive · top 5,000 on PyPI
yagmailSimplifies sending emails via Gmail or any SMTP…
permissive · top 15,000 on PyPI
django-sendgrid-v5Provides a Django email backend that sends…
permissive · top 15,000 on PyPI
Flask-MailFlask-Mail adds email-sending functionality to…
permissive · top 5,000 on PyPI
emailsBuild and send HTML and plain-text emails with…
permissive · top 15,000 on PyPI