Skip to content
AXVI BUILD · WRITE · SHIP
Packages

Laravel Mailing List

Mailing lists for Laravel Rust in your own database: double opt-in, campaigns that never go out twice, one-click unsubscribe, and Mailchimp lists behind the same calls.

Laravel Mailing List

People subscribe and confirm, you send campaigns through your own mailer, and they leave with one click. No service charging per subscriber, and the addresses stay in your database. If a list already lives in Mailchimp, the same calls add, read and remove its members there.

Features

  • Double opt-in: a subscription becomes real when the person clicks the link in the email
  • A consent record: where each subscription came from, the IP address, when it was confirmed
  • A subscribe route that answers a plain form, htmx and JSON clients, with a rate limit
  • Campaigns in Markdown or HTML, with the subscriber's name and their own unsubscribe link
  • Sent once: a crash, a deploy or a job that runs twice never mails anyone twice
  • One-click unsubscribe with the List-Unsubscribe headers Gmail and Yahoo require
  • A rate limit across workers, so your mail server isn't flooded
  • A suppression list, CSV import and export, and commands for every step
  • Mailchimp lists behind the same calls (feature mailchimp)
  • Texts your team edits with laravel-template-engine (feature template-engine)
  • Tested on SQLite, PostgreSQL and MySQL

Installation

cargo add laravel-mailing-list

Declare your lists in src/app.rs and run laravel migrate:

MailingListServiceProvider::new()
    .list("blog", List::local().name("AxVi blog"))

Usage

let campaign = lists::get("blog")
    .await?
    .campaign("New on the blog")
    .markdown("Hi {{ subscriber.name }}, there's a new post on the blog.")
    .create()
    .await?;

campaign.send().await?;

Subscribe forms, confirmation, the suppression list, Mailchimp and commands are covered in the README on GitHub.

Esc