Skip to main content

simple_module_newsletter

Newsletters for SimpleModule hosts. A campaign is written once, rendered to HTML and plain text, and sent over SMTP (the Google Workspace relay) to the confirmed subscribers of a list, throttled to a daily cap and a per-minute rate.

Subscribers do not live here. Lists, subscribers, their double opt-in state and tags are simple_module_records data; newsletter reads them only through sm_records.contracts.newsletter. What newsletter owns is the campaign, its sends and clicks, and the per-tenant suppression list (addresses that must never be mailed again: unsubscribes, hard bounces, complaints). Design: docs/superpowers/specs/2026-11-03-newsletter-module-design.md in the source repo; the guide is docs/index.md.

Status: complete. You can write a campaign in a Puck editor, preview it as the server renders it, send a test to up to five addresses, and send it to a list: a beat task (newsletter.dispatch) freezes the audience and sends within a daily cap and a per-minute rate, with retries, pause, resume and cancel, and an unsubscribe page with RFC 8058 one-click. Open and click tracking and a campaign report are described in docs/tracking.md. See docs/content.md for blocks, merge fields and the URL rules, docs/sending.md for how sending works and docs/operations.md for what must run (worker and beat, the secret, the DKIM checklist). Segments, campaign audiences, the subscriber screen and suppression lifts: docs/audience.md. A one-time Mailchimp import (ZIP or CSVs, statuses and tags kept, opt-outs and bounces become suppressions, nothing is ever resubscribed or confirmed): docs/import.md.

Install

pip install simple_module_newsletter

Add simple_module_newsletter to your host's dependencies; for an in-repo checkout, resolve it from the workspace:

[tool.uv.sources.simple_module_newsletter]
workspace = true

The module needs the framework's settings and background_tasks modules and simple_module_records. The news, pagebuilder and events extras add article, page and event cards to the editor; without them those blocks are hidden. Migrations live in the consuming host (make migration), never in the wheel.

Usage

Settings

Settings are DB-backed (the framework's settings module), never environment variables. Configure them on the Settings screen or with scripts/set_setting.py. The SMTP password is the exception: it is stored encrypted under the host's secret key and written only through PUT /api/newsletter/settings/smtp-password (needs newsletter.manage and settings.edit; scripts/set_setting.py would store it in plaintext, which workers refuse: the dispatcher does not run until it is re-saved through the endpoint, so always use the endpoint). The generic Settings screen refuses newsletter writes: use the module's own page, /admin/newsletter/settings. Changing the SMTP host, port, security or username clears the stored password.

Screens

Screen URL Needs
Campaigns /admin/newsletter/ newsletter.view
Segments /admin/newsletter/segments newsletter.view (edit: newsletter.edit)
Subscribers /admin/newsletter/subscribers newsletter.view and records.view
Suppressions /admin/newsletter/suppressions newsletter.manage
Import /admin/newsletter/import newsletter.manage
Settings /admin/newsletter/settings newsletter.manage

Permissions

Permission Allows
newsletter.view See campaigns and preview them, reports, segments; with records.view, the subscriber screen
newsletter.edit Create and edit campaigns and segments; tag and untag subscribers (with records.view)
newsletter.send Send a test; schedule or send, unschedule, pause, resume and cancel a campaign; the send estimate
newsletter.manage The settings page (saving it and the SMTP password also need settings.edit), the suppressions screen and its lifts, and unsubscribing a subscriber (with records.view), the Mailchimp import and creating a list (a records list type, without records.manage_types)

Every entry point binds a tenant: a single-tenant host uses default, a multi-tenant host the organisation the framework resolved (403 tenant_required for admin routes, 404 for public ones when none).

Metadata

Release files for simple-module-newsletter 0.0.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simple-module-newsletter 0.0.17
File Size Uploaded Provenance Actions
simple_module_newsletter-0.0.17.tar.gz 561.6 kB With provenance Details for simple_module_newsletter-0.0.17.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for simple-module-newsletter 0.0.17
File Interpreter ABI Platform Actions
simple_module_newsletter-0.0.17-py3-none-any.whl Python 3 none any Details for simple_module_newsletter-0.0.17-py3-none-any.whl

Total release size: 987.1 kB

Release files / simple_module_newsletter-0.0.17.tar.gz

Download URL simple_module_newsletter-0.0.17.tar.gz
Size 561.6 kB
Tags Source
SHA-256 checksum
How to use checksums
afbbff1f6f9f2c3809e157919944e8c1511f9bb4c940edea6a84e8dce2caa060
BLAKE2b-256 checksum
How to use checksums
b259f74fede131c7e8b9f03886c8bb65c84367743b4b00b14c649b1fad54fa3d
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 Nov 29, 2026.

Transparency log

Release files / simple_module_newsletter-0.0.17-py3-none-any.whl

Download URL simple_module_newsletter-0.0.17-py3-none-any.whl
Size 425.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e43bbd6ad672e0f885cbd85b68e38260442615b0cd7bea78c3953cbba477d46
BLAKE2b-256 checksum
How to use checksums
b25a206e53f62153505dd5b2557cc0e2de04886689c0c3b25740a76bae530017
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 Nov 29, 2026.

Transparency log

Security for simple-module-newsletter 0.0.17

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for simple_module_newsletter-0.0.17.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 Nov 29, 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.0.17 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