PHPackages                             a2zwebltd/laravel-newsletter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. a2zwebltd/laravel-newsletter

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

a2zwebltd/laravel-newsletter
============================

A portable Laravel newsletter / broadcast-mailing engine — admin-authored mailings to registered users and external subscribers, approval → schedule → send workflow, per-recipient tracking, double opt-in subscribe/verify/unsubscribe flow, queued delivery with rate limiting, mail templates, and Nova admin resources.

v1.1.0(2w ago)035↓62.5%1MITPHPPHP ^8.2

Since Jun 6Pushed 4d agoCompare

[ Source](https://github.com/a2zwebltd/laravel-newsletter)[ Packagist](https://packagist.org/packages/a2zwebltd/laravel-newsletter)[ Docs](https://github.com/a2zwebltd/laravel-newsletter)[ RSS](/packages/a2zwebltd-laravel-newsletter/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (6)Dependencies (18)Versions (7)Used By (0)

Laravel Newsletter
==================

[](#laravel-newsletter)

[![Packagist Version](https://camo.githubusercontent.com/199842fba5d89a0bfddec62e089d5e3ede7cc008af2e477528bc9022192802d8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61327a7765626c74642f6c61726176656c2d6e6577736c65747465722e737667)](https://packagist.org/packages/a2zwebltd/laravel-newsletter)[![Downloads](https://camo.githubusercontent.com/414cb7ec7b48ff38465b13b09ff60c1df2c65eda9d0face795262a8c6871852e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61327a7765626c74642f6c61726176656c2d6e6577736c65747465722e737667)](https://packagist.org/packages/a2zwebltd/laravel-newsletter)[![PHP](https://camo.githubusercontent.com/b5d4f7901c58ad1ddfff679966f426cc25a9354bab763846b9a7276c2feab4e0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e322d626c7565)](https://camo.githubusercontent.com/b5d4f7901c58ad1ddfff679966f426cc25a9354bab763846b9a7276c2feab4e0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e322d626c7565)[![Laravel](https://camo.githubusercontent.com/ee7cca03cd9498dd9ab503e39be1a6c2d5d9f97a7737266a34cecba057a2fa3c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d313225323025374325323031332d626c7565)](https://camo.githubusercontent.com/ee7cca03cd9498dd9ab503e39be1a6c2d5d9f97a7737266a34cecba057a2fa3c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d313225323025374325323031332d626c7565)

A portable Laravel newsletter / broadcast-mailing engine. Admin-authored mailings are delivered to your registered users **and** anonymous subscribers through an approval → schedule → send workflow, with per-recipient delivery tracking, a double opt-in subscribe / verify / unsubscribe flow, queued sending with rate limiting, customizable mail templates, and ready-made Nova admin resources.

Designed to drop into any Laravel app with minimal wiring while staying fully customisable — the host application keeps control of its user model, audience rules, branding and notifications.

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 11 / 12 / 13
- `spatie/laravel-settings` ^3 (sender settings)
- `cviebrock/eloquent-sluggable` (mailing slugs)
- `dyrynda/laravel-model-uuid` (efficient UUIDs)
- `laravel/nova` ^5 (optional — auto-registers Nova resources when present)
- `ashallendesign/short-url` (optional — CTA link shortening)

Installation
------------

[](#installation)

```
composer require a2zwebltd/laravel-newsletter
php artisan migrate
php artisan vendor:publish --tag=newsletter-config   # optional
php artisan vendor:publish --tag=newsletter-views     # optional, to rebrand templates
```

Add the trait to your `User` model so it can receive mailings:

```
use A2ZWeb\Newsletter\Concerns\ReceivesMailings;
use A2ZWeb\Newsletter\Contracts\CanReceiveMailing;

class User extends Authenticatable implements CanReceiveMailing
{
    use ReceivesMailings;
}
```

Register the sender settings class with `spatie/laravel-settings` (the package auto-discovers it, but you can also add it explicitly in `config/settings.php`):

```
'settings' => [
    \A2ZWeb\Newsletter\Settings\MailingSettings::class,
],
```

How it works
------------

[](#how-it-works)

1. **Author** a `Mailing` in Nova (title, markdown content, optional CTA, template).
2. **Approve** it — recipients are generated from the configured audience (eligible users + verified subscribers) and `MailingApproved` fires.
3. **Send now** or **Schedule** — a `SendMailingJob` is queued per recipient, rate-limited via the `mailings` limiter (`newsletter.per_minute`).
4. On delivery, `MailingDelivered` fires so you can mirror the mailing into an in-app inbox, analytics, etc.

Anonymous visitors subscribe through `newsletter.subscribe`, confirm via a tokenised verification link, and can unsubscribe at any time. A standards compliant `List-Unsubscribe` header is added to every mailing.

Configuration
-------------

[](#configuration)

See `config/newsletter.php`. Highlights:

KeyPurpose`user_model`Your application's user model`per_minute`Send-rate limit (drives the `mailings` limiter)`email_view_prefix`View path for mailing bodies — point at your own branded templates`inline_css_path`Absolute path to a compiled CSS file inlined into every mailing (`null` = no inlining). See [Email CSS inlining](#email-css-inlining-optional)`audience.users_query`Closure scoping eligible registered users`audience.type_scopes`Per-mailing-type audience refinements`callbacks.*`Hooks for existing-user subscribe / unsubscribe / uuid lookup`short_url.enabled`Auto-shorten CTA links when `ashallendesign/short-url` is installed`nova.group` / `nova.user_resource`Nova menu group and the User resource used for relations`routes.*`Toggle/route prefix, subscribe middleware, captcha ruleEmail CSS inlining (optional)
-----------------------------

[](#email-css-inlining-optional)

The **bundled templates are already self-contained** — every element carries inline `style`attributes — so they render correctly with **no extra CSS** and `inline_css_path` left at its default `null`. You only need this feature if you ship **custom templates** that style elements via CSS classes (e.g. a markdown body whose ``/``/`` come from a class rule), since most email clients strip ``/``.

To enable it, point `inline_css_path` (or the `NEWSLETTER_INLINE_CSS_PATH` env var) at the **absolute path of a CSS file**; its rules are inlined onto matching elements at send time:

```
NEWSLETTER_INLINE_CSS_PATH="${PWD}/public/build/assets/mail.css"
```

**A missing file silently disables inlining — it never throws** — so a broken or skipped build degrades to plain templates rather than failing the queue job.

> ⚠️ **Do NOT point this at raw Tailwind v4 output.** Tailwind v4 compiles utilities and `@apply`into `@layer` rules full of CSS custom properties (`padding: calc(var(--spacing) * 6)`) and `oklch()` colors. Those references resolve from `:root`/`@theme`, which email clients strip — so once inlined onto an element they **collapse to nothing** (lost padding, fonts, colors). The inliner needs **plain, literal CSS**: explicit `px`/`%` and hex/rgb colors, no `var()`, no `oklch()`, no `@layer`/`@apply`. Hand-write the email stylesheet (or post-process Tailwind output to literal values) and build it before the app serves — it is host-specific, so the package does not ship it. A minimal example:

```
/* resources/css/mail.css — plain, email-safe CSS */
.content-wrap p  { padding: 8px 0; font-size: 16px; line-height: 1.625 !important; }
.content-wrap h1 { padding: 16px 0; font-weight: 700; font-size: 22px; }
.btn-primary     { display: inline-block; background: #4f46e5; color: #fff !important; padding: 12px 20px; border-radius: 8px; }
```

Events
------

[](#events)

EventWhen`MailingSaved`A mailing is saved (CTA shortening, cache busting)`MailingApproved`A mailing is approved and recipients generated (SEO/IndexNow)`MailingDelivered`An email was delivered to a recipient (in-app notifications)Routes
------

[](#routes)

MethodURINameGET`/newsletters``newsletters`GET`/newsletter_form``newsletters.form`GET`/newsletters/{slug}``newsletters.item`GET`/mailing/{slug}``mailing`POST`/newsletter/subscribe``newsletter.subscribe`GET`/newsletter/verify/{token}``newsletter.verify`GET`/unsubscribe/{uuid}``unsubscribe.show`POST`/unsubscribe/{uuid}``unsubscribe.confirm`The archive group can be disabled (`newsletter.routes.archive_enabled`) if your app renders its own newsletter pages.

Cron
----

[](#cron)

The package self-registers the scheduled-send command. To run it yourself instead, disable `newsletter.schedule.send_scheduled` and add:

```
// routes/console.php
use Illuminate\Support\Facades\Schedule;

Schedule::command('mailings:send-scheduled')->everyMinute();
```

Testing
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

MIT — see LICENSE file.

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance98

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

6

Last Release

17d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2b500dd3d9b470b50b1ed911cd24a6fdcce51dd97dceb4f97879f727a14495a8?d=identicon)[dawid-makowski](/maintainers/dawid-makowski)

---

Top Contributors

[![makowskid](https://avatars.githubusercontent.com/u/6271194?v=4)](https://github.com/makowskid "makowskid (9 commits)")[![yeganemehr](https://avatars.githubusercontent.com/u/16887332?v=4)](https://github.com/yeganemehr "yeganemehr (2 commits)")

---

Tags

laravellaravel-novalaravel-nova-packagelaravel-packagenewsletter-automationnewsletter-softwarenewsletter-systemlaravelemailnewslettermailingnovaBroadcastsubscribers

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/a2zwebltd-laravel-newsletter/health.svg)

```
[![Health](https://phpackages.com/badges/a2zwebltd-laravel-newsletter/health.svg)](https://phpackages.com/packages/a2zwebltd-laravel-newsletter)
```

###  Alternatives

[mydnic/laravel-subscribers

Easily Manage Internal Newsletter Subscribers in Laravel — with campaigns, mail sending, and tracking

265.1k](/packages/mydnic-laravel-subscribers)[finity-labs/fin-mail

A powerful email template manager and composer for Filament with dynamic token replacement, template versioning, and inline email sending.

284.8k2](/packages/finity-labs-fin-mail)[hocza/sendy

Sendy API implementation for Laravel

71205.8k](/packages/hocza-sendy)[coreproc/nova-notification-feed

A Laravel Nova package that adds a notification feed in your Nova app.

9949.3k](/packages/coreproc-nova-notification-feed)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
