Skip to main content

Postbox logo

django-postbox

Catch outgoing Django mail and read it in an inbox per recipient.
For local development, review apps and staging: read password resets, invites and receipts
the way your users will, with HTML, text, headers and attachments. No SMTP server needed.

Documentation · Getting started · Capture and forward · Permissions · Themes · PyPI

An inbox with the newsletter mail open, modern theme

Your project sends mail: password resets, invites, order confirmations. While you build them, you want to see them the way your users will, without anything leaving your laptop or test server.

Postbox is a Django email backend that catches every mail and gives each recipient their own inbox. Open /dev/inbox/, click alice@example.com, and read exactly what Alice got: HTML, plain text, headers and attachments.

  • An inbox per person. To, Cc and Bcc each get their own copy.
  • Live. New mail shows up within five seconds, without reloading.
  • Safe. Mail HTML is sandboxed, and only staff can open the inbox by default.
  • Fits your setup. Pass mail on to the console or SMTP, and keep it in the database, memory or a cache.
  • Four themes, no build step, no CDN.

Works with Python 3.11 to 3.14 and Django 5.2, 6.0 and 6.1.

Quick start

The short version of the Getting started tutorial.

1. Install

pip install django-postbox

2. Add the app and send your mail through Postbox

On Django 6.1+, with named mailers:

# settings.py

INSTALLED_APPS = [
    # ...
    "django_postbox",
]

MAILERS = {
    "default": {
        "BACKEND": "django_postbox.backends.EmailBackend",
        # Optional: also print every mail in the terminal
        "OPTIONS": {"forward_to": "console"},
    },
    "console": {
        "BACKEND": "django.core.mail.backends.console.EmailBackend",
    },
}

On Django 5.2 and 6.0, replace MAILERS with:

# settings.py

EMAIL_BACKEND = "django_postbox.backends.EmailBackend"

# Optional: also print every mail in the terminal
POSTBOX_FORWARD_BACKEND = "django.core.mail.backends.console.EmailBackend"

3. Add the inbox to your URLs

# urls.py

from django.conf import settings
from django.urls import include, path

urlpatterns = [
    # ...
]

if settings.DEBUG:
    urlpatterns += [path("dev/inbox/", include("django_postbox.urls"))]

4. Migrate and create a staff user

python manage.py migrate
python manage.py createsuperuser

5. Send a mail

python manage.py shell
>>> from django.core.mail import send_mail
>>> send_mail("Hello", "Hi Alice", "me@example.com", ["alice@example.com"])
1

6. Open the inbox

python manage.py runserver

Go to http://127.0.0.1:8000/dev/inbox/, log in, and Alice's inbox is waiting for you.

Themes

Pick a default with POSTBOX_THEME, and everyone can choose their own under Options in the inbox. You can also write your own theme in one CSS file.

modern (default) mail2003
Inbox, modern theme Inbox, mail2003 theme
mail2000 mail2010
Inbox, mail2000 theme Inbox, mail2010 theme

Documentation

The documentation walks you through everything beyond the quick start:

Development

See Working on Postbox for the full guide.

uv sync
make migrate           # the test project in tests/project
uv run python manage.py createsuperuser
make mail              # send demo mail to ten random people
make rs                # http://127.0.0.1:8000/dev/inbox/

make lint              # ruff, ty and pytest
uv run tox             # every Python and Django version
make docs-serve        # the docs, reloading as you edit
make screenshots       # rebuild docs/img in every theme
make htmx              # update the bundled htmx

Metadata

Release files for django-postbox 0.1.3

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-postbox 0.1.3
File Size Uploaded Provenance
django_postbox-0.1.3.tar.gz 42.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-postbox 0.1.3
File Interpreter ABI Platform
django_postbox-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 93.6 kB

Release files / django_postbox-0.1.3.tar.gz

Download URL django_postbox-0.1.3.tar.gz
Size 42.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a9e33271a4e60d8130e4e4257694126290c30f8cb5607ab9fd5e4c83f7dc6ffd
BLAKE2b-256 checksum
How to use checksums
663d81813eeac7bc4fb310524058624228c9472346d3c66e685cee94ececdc89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Release files / django_postbox-0.1.3-py3-none-any.whl

Download URL django_postbox-0.1.3-py3-none-any.whl
Size 51.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c715413eb920f440565546cb5ba549513227b6a39082a9b16cfafd189cb4ca2
BLAKE2b-256 checksum
How to use checksums
6b7c39b88cde1af4313dc75b048eb2f5cb2602566ce017e90ba54336068fb3c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Security for django-postbox 0.1.3

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for django_postbox-0.1.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

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