Newsletters 0.1.0: Email newsletters for PhoenixKit as their own package
Newsletters 0.1.0 is the first release of PhoenixKit Newsletters as its own package, taken out of PhoenixKit core. It gives a Phoenix app mailing lists, email broadcasts written in Markdown, background delivery and unsubscribe links.
Lists and broadcasts
Under Newsletters in the admin, the Lists pages create and manage mailing lists, each with a name, a slug and a status, and show each list’s members. The Broadcasts pages hold your emails: write the body in Markdown with a live preview, choose a list and, if the Emails module is installed, an email template to wrap it in. Save it as a draft, send it now or schedule it for later. Each broadcast has a details page.
Delivery and tracking
Sending runs in the background on Oban. The audience is processed in batches of 500, each recipient gets a delivery record and a job of their own, and each delivery moves through pending, sent, delivered, opened, bounced or failed, so you can see how a broadcast did per person.
The body can use {{name}}, {{email}} and {{unsubscribe_url}}, filled in for each recipient. Unsubscribe links are signed and valid for seven days, and can unsubscribe a reader from one list or from all of them.
Getting started
Add {:phoenix_kit_newsletters, "~> 0.1"} to your dependencies. Newsletters needs PhoenixKit core 1.7, Oban and Phoenix LiveView. Add a newsletters queue to your Oban config, for example queues: [newsletters: 10]. The tables come from core’s migrations, applied with mix phoenix_kit.update. Then turn the module on under Admin > Modules > Newsletters.
Newsletters 0.1.0. Install or update: {:phoenix_kit_newsletters, "~> 0.1"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.