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.2

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.2
File Size Uploaded Provenance
django_postbox-0.1.2.tar.gz 42.1 kB With provenance Details

Built distribution (wheel)

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

Total release size: 92.7 kB

Release files / django_postbox-0.1.2.tar.gz

Download URL django_postbox-0.1.2.tar.gz
Size 42.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7d762ae96b8d24323c635d6083226c13b867443aa992cb2ca34d003b6e2e8d35
BLAKE2b-256 checksum
How to use checksums
26008203764a0711fe87ea50ff4e8c4453f9caadd7518959e8b54f6d6eea21eb
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 27, 2026.

Transparency log

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

Download URL django_postbox-0.1.2-py3-none-any.whl
Size 50.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
52623cc1a1e4932055c93ee0da2e72b84424bbc4a7744d9c4415e5b6b8819e85
BLAKE2b-256 checksum
How to use checksums
f4e3e4bd9268a4aa8de959ed27756d8abc656f2c3468158b90015ec94bbf7b52
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 27, 2026.

Transparency log

Security for django-postbox 0.1.2

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.2.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 27, 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.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files Full provenance

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