spatie/laravel-newsletter for Multi-Provider Subscriptions
Manage newsletters in Laravel
At a glance
- What is it?
- spatie/laravel-newsletter gives Laravel applications a common interface for managing subscribers with Mailcoach, MailChimp, and MailerLite. It reduces provider-specific application calls, but configuration and subscriber fields remain tied to the selected service.
- Who is it for?
- Adopt this package if a Laravel application needs subscription operations through a small, provider-neutral facade and can accept one provider's configuration and field conventions. Do not choose it for campaigns, segmentation, or delivery automation that the documented methods do not cover.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 3 days ago.
- What is it written in?
- Mainly PHP, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 6, 2026, and from our analysis. They are not legal advice.
Star history
- spatie/laravel-newsletter1,640 ★ · +1
| Repository | 2026-10-16 | 2026-11-06 |
|---|---|---|
| spatie/laravel-newsletter | 1.6k | 1.6k |
1 Stars in the last 21 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The subscription problem laravel-newsletter addresses
spatie/laravel-newsletter is for Laravel developers who need application-level subscription management across email services. Its documented providers are Mailcoach, MailChimp, and MailerLite. Without a shared package, changing providers or calling more than one provider can place provider-specific HTTP and SDK logic throughout controllers, commands, jobs, and console actions. This package instead places that variation behind a Laravel facade.
The documented operations cover subscribing, updating or subscribing an existing contact, and unsubscribing. Applications can target the configured default list or select another configured list by its key. This is useful for forms, account lifecycle actions, and administrative commands that need to synchronize an email address with an external mailing platform.
The scope is subscription management, not newsletter campaign composition or message delivery. The README describes the package as integrating subscriptions to email lists of various email services. That boundary matters when selecting the package. It can reduce repeated integration code, but it does not turn into a complete newsletter application.
Driver selection and Laravel request flow
The package routes calls through a driver selected by the `driver` setting in `config/newsletter.php`. Application code imports `Spatie\Newsletter\Facades\Newsletter`, calls a facade method, and leaves the selected driver responsible for interacting with the configured email service. The available driver classes named in the installation documentation are `Spatie\Newsletter\Drivers\MailcoachDriver`, `Spatie\Newsletter\Drivers\MailChimpDriver`, and `Spatie\Newsletter\Drivers\MailerLiteDriver`.
Configuration supplies `driver_arguments`, including `api_key` and `endpoint`, plus a `lists` array. The default list is named `subscribers`, and its `id` comes from `NEWSLETTER_LIST_ID`. The identifier has a provider-specific meaning: an email-list UUID for Mailcoach, a list ID for MailChimp, and a group ID for MailerLite. Calls can omit the list name to use `default_list_name`, or pass a configured key such as `subscribers`.
This is a configuration-driven adapter rather than a provider registry that the README exposes to application developers. Mailcoach receives an endpoint. The instructions say to set the endpoint to `null` for MailChimp and MailerLite. Each provider also requires a different Composer SDK, so switching drivers means changing both the class and provider dependencies, not merely changing one environment variable.
Installing the package and publishing newsletter configuration
Install the base package through Composer. This adds the Laravel newsletter integration to the application dependency graph.
composer require spatie/laravel-newsletterThen publish the package configuration into the application. The README states that this creates `config/newsletter.php`.
php artisan vendor:publish --tag="newsletter-config"The published file controls the driver, driver arguments, default list, and named lists. Its central environment variables are `NEWSLETTER_DRIVER`, `NEWSLETTER_API_KEY`, `NEWSLETTER_ENDPOINT`, and `NEWSLETTER_LIST_ID`. In a real installation, the reader should confirm that Laravel can read those values and that the configured list identifier belongs to the selected provider.
The README also allows `log` or `null` as the `driver` value to prevent direct API calls. Those values should be treated as integration test points rather than assumed production substitutes for a provider.
Selecting Mailcoach, MailChimp, or MailerLite
Provider selection requires a provider SDK. For Mailcoach, install the SDK documented by the package:
composer require spatie/mailcoach-sdk-phpSet the driver to `Spatie\Newsletter\Drivers\MailcoachDriver::class`. According to the README, provide the API key and endpoint from Mailcoach settings, then use the UUID of the relevant Mailcoach email list as `NEWSLETTER_LIST_ID`.
For MailChimp, install its API client:
composer require drewm/mailchimp-apiSet the driver to `Spatie\Newsletter\Drivers\MailChimpDriver::class`, provide the MailChimp API key and list ID, and set the `endpoint` config value to `null`.
MailerLite has a separate dependency and configuration path:
composer require mailerlite/mailerlite-phpSet the driver to `Spatie\Newsletter\Drivers\MailerLiteDriver::class`. The API key and group ID come from the MailerLite dashboard under Integrations > API, and `endpoint` must also be `null`. These provider-specific steps are a concrete adoption constraint: the common facade does not remove external account, credential, and identifier setup.
Subscribing, updating, and unsubscribing through the facade
The shortest documented subscription call uses the facade's default list:
use Newsletter;
Newsletter::subscribe('[email protected]');To target a named list, pass its configured key as the named `listName` argument:
Newsletter::subscribe('[email protected]', listName: 'subscribers');The second argument has different meanings by provider. Mailcoach accepts attributes such as `first_name` and `last_name`. MailChimp receives merge variables such as `FNAME` and `LNAME`. MailerLite receives subscriber fields such as `name` and `last_name`. The package therefore standardizes the call shape, but not the meaning of its metadata.
Use `subscribeOrUpdate` when the application needs an upsert-style subscription operation, with the provider's field naming convention:
Newsletter::subscribeOrUpdate('[email protected]', ['first_name' => 'Rince', 'last_name' => 'Wind']);Unsubscribe uses another direct facade operation:
Newsletter::unsubscribe('[email protected]');Maintenance, releases, upgrades, and license implications
The repository is not archived. Its last push was on 2026-06-26, and the listed releases include `5.4.0` on 2026-04-28, `5.3.2` on 2026-02-21, and `5.3.1` on 2025-03-26. Those facts show recent repository activity.
The repository includes `CHANGELOG.md` and `UPGRADING.md`. Those are the correct project-specific files to inspect before changing the package version, especially when moving across several minor or major releases.
The package uses the MIT license. That permits use, modification, distribution, and sublicensing subject to the license terms, while the notice must be preserved. This is a technical reading of the declared license, not legal advice. Organizations still need to account separately for their Laravel application, provider SDKs, accounts, API terms, and handling of subscriber data.
Editorial conclusion
Adopt this package if a Laravel application needs subscription operations through a small, provider-neutral facade and can accept one provider's configuration and field conventions. Do not choose it for campaigns, segmentation, or delivery automation that the documented methods do not cover. Before adoption, verify the selected driver, required SDK, list identifier, API credentials, endpoint rules, and the meaning of attributes for the chosen provider.
Frequently asked questions
Which email services does spatie/laravel-newsletter support?
The README lists Mailcoach, MailChimp, and MailerLite. Each provider uses a separate driver and has its own Composer SDK.
How do I configure the newsletter list in spatie/laravel-newsletter?
Set `NEWSLETTER_LIST_ID` for the `subscribers` list. Its value is an email-list UUID for Mailcoach, a list ID for MailChimp, or a group ID for MailerLite.
Can spatie/laravel-newsletter subscribe or update an existing contact?
The facade provides `subscribe` and `subscribeOrUpdate`. The latter subscribes the address or updates it when it is already subscribed, with attributes represented according to the selected provider.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/spatie-laravel-newsletter)Star history chart for your README
[](https://hysenlabs.com/projects/spatie-laravel-newsletter)Was this useful?