PHPackages                             jsefton/laravel-mailing-list - 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. jsefton/laravel-mailing-list

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

jsefton/laravel-mailing-list
============================

Laravel mailing list manager

1.0.0(5y ago)158[1 issues](https://github.com/jsefton/laravel-mailing-list/issues)MITPHP

Since May 3Pushed 5y ago1 watchersCompare

[ Source](https://github.com/jsefton/laravel-mailing-list)[ Packagist](https://packagist.org/packages/jsefton/laravel-mailing-list)[ Docs](https://endor.digital)[ RSS](/packages/jsefton-laravel-mailing-list/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Laravel Mailing List
====================

[](#laravel-mailing-list)

This package gives you a quick out the box mailing list storage and API to use to add people to specific mailing lists

You can create a mailing list and then attach a email contact to a list.

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

[](#installation)

```
composer require jsefton/laravel-mailing-list
```

You will need to publish the config to set if API is enabled

```
php artisan vendor:publish --tag=mailing-list.config
```

Next run migrations to add the required tables

```
php artisan migrate
```

Usage
-----

[](#usage)

### Config

[](#config)

The configuration file allows you to enable or disable the API feature. The API feature provides a POST endpoint that you can consume in your application for a sign up form to send the data and have it store against a specific mailing list.

The API flag is set through an environment variable of `MAILING_LIST_API`

```
/**
 * Enable API for mailing lists to allow creation
 */
'api' => env('MAILING_LIST_API', true),
```

You can also change the route that is used for the API subscribe endpoint to anything you desire.

```
/**
 * Route for API requests (only registered if api is enabled)
 */
'route' => '/api/mailing-list'
```

The above will result in API POST requests to be sent to `/api/mailing-list/{id}`, where `{id}` is the ID of the mailing list.

This is registered within the application with a named route and can be linked to with:

```
route('api.mailing-list.subscribe', ['id' => 1])
```

### API

[](#api)

The API only exposes an endpoint for people to subscribe in order to not expose any data.

You can send the following data to the endpoint:

```
{
    "email": "info@endor.digital",
    "first_name": "Jamie", (optional)
    "last_name": "Sefton", (optional)
    "source": "Website" (optional)
}
```

Many forms will not have 2 different fields for `first_name` and `last_name`. So the API has been built to allow you to POST just `name` field and will automatically split this up into first name and last name. E.g.

```
{
    "email": "info@endor.digital",
    "name": "Jamie Sefton", (optional)
    "source": "Website" (optional)
}
```

### Console

[](#console)

You can either create a new mailing list directly through the database, with your own UI you create or using the shipped console command. You can do this by running:

```
php artisan mailing-list:create
```

This will then ask you to enter a name of the mailing list. Once complete it will return back the ID of the new mailing list for you to use in your application to create POST requests to the API

You can get a list of current mailing lists in your console by running:

```
php artisan mailing-list:list
```

```
+----+------+
| ID | Name |
+----+------+
| 1  | Test |
+----+------+
```

### Models

[](#models)

If you wish to just consume the models within your application and maybe not use the API then you can use the following models. The models are standard eloquent and can be used in a standard Laravel way.

#### MailingList

[](#mailinglist)

namespace: `JSefton\MailingList\Models\MailingList`

Contains the individual lists that a user is subscribed against, which can be created in the above console command.

You can get the email contacts attached to a specific list once loaded with:

```
$emails = $mailingList->emails
```

#### MailingListEmail

[](#mailinglistemail)

namespace: `JSefton\MailingList\Models\MailingListEmail`

This is the object of each individual email that is subscribed. They are attached to a MailingList and is unique per email per list.

You can get the mailing list they are attached to with:

```
$list = $email->mailingList
```

---

Please note currently for Laravel 7+ until tested and verified in lower versions.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

1836d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/41b413127c7499a63bcb5c5ae903bd8961ba29300b6ccbda873e0c4bf06d0a02?d=identicon)[jsefton](/maintainers/jsefton)

---

Top Contributors

[![jsefton](https://avatars.githubusercontent.com/u/4114741?v=4)](https://github.com/jsefton "jsefton (6 commits)")

---

Tags

laravelmailemailmailing list

### Embed Badge

![Health badge](/badges/jsefton-laravel-mailing-list/health.svg)

```
[![Health](https://phpackages.com/badges/jsefton-laravel-mailing-list/health.svg)](https://phpackages.com/packages/jsefton-laravel-mailing-list)
```

###  Alternatives

[propaganistas/laravel-disposable-email

Disposable email validator

5762.6M6](/packages/propaganistas-laravel-disposable-email)[vemcogroup/laravel-sparkpost-driver

SparkPost driver to use with Laravel 6.x|7.x|8.x|9.x|10.x

421.7M1](/packages/vemcogroup-laravel-sparkpost-driver)[railsware/mailtrap-php

The Mailtrap SDK provides methods for all API functions.

56770.5k](/packages/railsware-mailtrap-php)[synergitech/laravel-postal

This library integrates Postal with the standard Laravel mail framework.

38107.1k](/packages/synergitech-laravel-postal)[juanparati/brevosuite

Complete Brevo integration with Laravel

1010.8k](/packages/juanparati-brevosuite)

PHPackages © 2026

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