v0.150.0

plain-email changelog

0.20.0 (2026-05-19)

What's changed

  • New in-memory email backend (plain.email.backends.locmem.EmailBackend) that captures sent messages in a list instead of delivering them — intended for tests. (7900426ef0)
  • New mailoutbox pytest fixture. It routes EMAIL_BACKEND to the in-memory backend for the duration of a test and yields the captured messages, clearing the outbox around each test and restoring the original backend afterward. It auto-registers via a pytest11 entry point — no plugin configuration needed. (7900426ef0)

Upgrade instructions

  • No changes required.

0.19.3 (2026-05-12)

What's changed

  • plain.email.message now imports Template and TemplateFileMissing from plain.templates (which is now a separate package, see the plain.templates carve-out). The user-visible email message API is unchanged. (19b622a7ca)
  • Pins plain>=0.143.0 and plain.templates>=0.1.0.

Upgrade instructions

  • No code changes required if you upgrade plain to 0.143.0 in the same step — plain.templates is pulled in automatically.

0.19.2 (2026-05-05)

What's changed

  • Exposes __version__ from importlib.metadata on plain.email for version probes that don't want to scrape pip metadata. (c6cf6edb)

Upgrade instructions

  • No changes required.

0.19.1 (2026-04-27)

What's changed

  • Replaced the inline style="height: 400px; border: 0;" on the toolbar email iframe with Tailwind utility classes (h-[400px] border-0) so the toolbar renders cleanly under a strict CSP. (e084bd8ad395)

Upgrade instructions

  • No changes required.

0.19.0 (2026-04-24)

What's changed

  • Added a preview email backend (plain.email.backends.preview.EmailBackend) that captures sent messages as .eml files in .plain/emails/ instead of delivering them. When plain.toolbar is installed, the toolbar gains an Email panel that lists recent captured messages and renders their HTML bodies inline; .eml files can also be opened directly in Mail.app. (9c3cef100997)
  • Fixed a stale backend count in the README. (c487206dc3db)

Upgrade instructions

  • No changes required. To use the new preview backend in development, set EMAIL_BACKEND = "plain.email.backends.preview.EmailBackend" (or PLAIN_EMAIL_BACKEND=plain.email.backends.preview.EmailBackend).

0.18.2 (2026-04-13)

What's changed

  • Migrated type suppression comments to ty: ignore for the new ty checker version. (4ec631a7ef51)

Upgrade instructions

  • No changes required.

0.18.1 (2026-04-05)

What's changed

  • Added OTel tracing to the SMTP email backend. Each _send() call now creates an email.send CLIENT span with email.system, email.recipients.count, email.has_attachments, server.address, and server.port attributes. SMTP errors set error.type on the span. No PII (addresses, subjects) is recorded. (b56a9edc9c7d)

Upgrade instructions

  • No changes required.

0.18.0 (2026-03-20)

What's changed

  • Removed auth_user and auth_password parameters from send_mail() and send_mass_mail() — these functions now always use the EMAIL_HOST_USER and EMAIL_HOST_PASSWORD settings for authentication. Use get_connection(username=..., password=...) and pass the connection directly if you need custom credentials (99c9e751e8)

Upgrade instructions

  • Remove any auth_user or auth_password arguments from send_mail() and send_mass_mail() calls.
  • If you need custom SMTP credentials per-call, create a connection with get_connection(username=..., password=...) and pass it via the connection parameter instead.

0.17.0 (2026-03-12)

What's changed

  • Removed file-based email backend — the plain.email.backends.filebased.EmailBackend has been removed along with the EMAIL_FILE_PATH setting. Use the console backend for local development instead (b0bfb96a7d27)

Upgrade instructions

  • If you were using EMAIL_BACKEND = "plain.email.backends.filebased.EmailBackend", switch to the console backend: EMAIL_BACKEND = "plain.email.backends.console.EmailBackend"
  • Remove any EMAIL_FILE_PATH setting from your configuration.

0.16.1 (2026-03-10)

What's changed

  • Removed type: ignore comment on EMAIL_HOST_PASSWORD default value, now that Secret is type-transparent (997afd9a558f)

Upgrade instructions

  • No changes required.

0.16.0 (2026-03-10)

What's changed

  • Removed fail_silently parameter from get_connection(), send_mail(), send_mass_mail(), and BaseEmailBackend.__init__() — email errors now always raise exceptions instead of being silently swallowed (d08315532ace)
  • BaseEmailBackend.open() return type changed from bool | None to bool (d08315532ace)
  • Simplified console and file-based email backends by removing try/except wrappers that relied on fail_silently (d08315532ace)
  • Cleaned up backend __init__ signatures — removed **kwargs passthrough and unused Any imports (d08315532ace)

Upgrade instructions

  • Remove any fail_silently=True/False arguments from send_mail(), send_mass_mail(), and get_connection() calls.
  • If you have a custom email backend subclass, remove fail_silently from __init__ and update open() to return bool instead of bool | None.

0.15.4 (2026-02-28)

What's changed

  • Replaced references to the removed DEFAULT_CHARSET setting with hardcoded "utf-8" in SMTP backend and message encoding (901e6b3c49)

Upgrade instructions

  • No changes required.

0.15.3 (2026-02-26)

What's changed

  • Auto-formatted config files with updated linter configuration (028bb95c3ae3)

Upgrade instructions

  • No changes required.

0.15.2 (2026-02-04)

What's changed

  • Added __all__ export to backends/base module (e7164d3891b2)
  • Removed @internalcode decorator from internal MIME helper classes (e7164d3891b2)

Upgrade instructions

  • No changes required.

0.15.1 (2026-01-28)

What's changed

Upgrade instructions

  • No changes required.

0.15.0 (2026-01-15)

What's changed

  • EMAIL_HOST_PASSWORD is now marked as a Secret type, ensuring the password is masked when displaying settings in CLI output (7666190)

Upgrade instructions

  • No changes required

0.14.0 (2026-01-13)

What's changed

  • Simplified public API exports to only include user-facing classes and functions (28f4849)
  • Improved README documentation with comprehensive usage examples and installation instructions (da37a78)

Upgrade instructions

  • No changes required

0.13.0 (2025-12-04)

What's changed

  • Internal typing improvements for better type checker compatibility (ac1eeb0)

Upgrade instructions

  • No changes required

0.12.0 (2025-11-12)

What's changed

  • The filebased email backend now requires EMAIL_FILE_PATH to be set and raises ImproperlyConfigured if not provided (f4dbcef)
  • BaseEmailBackend now uses Python's abstract base class with @abstractmethod for better type checking (245b5f4)

Upgrade instructions

  • If using the filebased email backend, ensure EMAIL_FILE_PATH is configured in your settings or passed when initializing the backend

0.11.1 (2025-10-06)

What's changed

  • Added comprehensive type annotations throughout the package for improved IDE support and type checking (5a32120)

Upgrade instructions

  • No changes required

0.11.0 (2025-09-19)

What's changed

  • Updated Python minimum requirement to 3.13 (d86e307)
  • Improved README with installation instructions and table of contents (4ebecd1)
  • Updated package description to "Everything you need to send email in Plain" (4ebecd1)

Upgrade instructions

  • Update your Python version to 3.13 or higher

0.10.2 (2025-06-23)

What's changed

Upgrade instructions

  • No changes required