skillfed

django-post_office

A Django app to monitor and send mail asynchronously, complete with template support.

django-post-office v3.11.2 130.2K downloads/30d#11,649 on PyPI1,092
Permissive license MIT Active released

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-office

uv

uv add django-post-office

poetry

poetry add django-post-office

Installing 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

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 4.2Framework :: Django :: 5.0Framework :: Django :: 5.1Framework :: Django :: 5.2Framework :: Django :: 6.0Intended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Communications :: EmailTopic :: Internet :: WWW/HTTPTopic :: Software Development :: Libraries :: Python Modules

Tags

django email queueasynchronous email sendingdjango email templatesbulk email managementscheduled email deliverydjango email backendhtml email with attachments
email-queuedjango-appasync-mail

More Python Modules packages