PHPackages                             twenty20/mailer - 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. twenty20/mailer

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

twenty20/mailer
===============

A multi-provider mailer package for SendGrid, Amazon SES.

v0.3(1y ago)03.9k↓100%MITPHPPHP ^8.2

Since Mar 2Pushed 1y agoCompare

[ Source](https://github.com/Twenty20DD/Mailer)[ Packagist](https://packagist.org/packages/twenty20/mailer)[ Docs](https://github.com/twenty20/mailer)[ RSS](/packages/twenty20-mailer/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (12)Versions (3)Used By (0)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c11911ca1f275b651729ec0b6f226eacbf7d2011907a3ecd104e8738774da1db/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7477656e747932302f6d61696c65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/twenty20/mailer)[![Total Downloads](https://camo.githubusercontent.com/aa4f2ad806ff5f51ef0c311fc448d2c6f759395d99a18d25099985e40cae3019/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7477656e747932302f6d61696c65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/twenty20/mailer)

Mailer Package
--------------

[](#mailer-package)

A multi-provider mailer package supporting SendGrid and Amazon SES.

### Installation

[](#installation)

Install the package via Composer:

```
composer require twenty20/mailer
```

Once installed, run the following command to complete the setup:

```
php artisan mailer:install
```

Specify the webhook URL in your choosen provider to:

```
http://yourdomain.com/mailer/webhook
```

`mailer/webhook` will be injected into your `web.php` routes from the installer.

### Usage

[](#usage)

The package provides Events &amp; Listeners.

Register these listeners in EventServiceProvider.php

```
protected $listen = [
    EmailBounced::class => [
        EmailBouncedListener::class,
    ],
    EmailDelivered::class => [
        EmailDeliveredListener::class,
    ],
    EmailDeferred::class => [
        EmailDeferredListener::class,
    ],
    ....
];
```

For Laravel 11 &amp; above you can register events and their corresponding listeners within the `boot` method of your application's `AppServiceProvider`:

```
public function boot(): void
{
    Event::listen(
        EmailBounced::class,
        EmailBouncedListener::class,
    );
    Event::listen(
        EmailDelivered::class,
        EmailDeliveredListener::class,
    );
    Event::listen(
        EmailDeferred::class,
        EmailDeferredListener::class
    );
    ....
}
```

---

These events will be triggered from the WebhookController.

Package ships with Listeners for each event which allows you to hook into and handle as required.

You will need to run `php artisan queue:work` to see any events in the logs whilst testing locally.

Lastly within your VerifyCSRFToken middleware, add the following:

```
protected $except = [
    'mailer/*',
];
```

Or if using a later version of Laravel, in `bootstrap/app.php`

```
->withMiddleware(function (Middleware $middleware) {
    $middleware->validateCsrfTokens(except: [
        'mailer/*',
    ]);
})->withExceptions(function (Exceptions $exceptions) {
    //
})->create();
```

After installation, add your chosen provider’s API key to the `.env` file, and you’re good to go.

You can then send emails and notifications as usual within your Laravel application.

---

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

### Contributing

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security Vulnerabilities

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

---

### Credits

[](#credits)

- [Twenty20](https://github.com/Twnety20)
- [All Contributors](../../contributors)

### License

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

31

—

LowBetter than 71% of packages

Maintenance50

Moderate activity, may be stable

Popularity22

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

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 ~17 days

Total

2

Last Release

367d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7f0f9518b16358f3876487332f4227308af0944930bc30779d8e91b20653f02d?d=identicon)[Twenty20](/maintainers/Twenty20)

---

Tags

laravelmailerTwenty20

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/twenty20-mailer/health.svg)

```
[![Health](https://phpackages.com/badges/twenty20-mailer/health.svg)](https://phpackages.com/packages/twenty20-mailer)
```

###  Alternatives

[innoge/laravel-msgraph-mail

Laravel Mail driver for Microsoft Office 365 using the MSGraph API

70295.3k1](/packages/innoge-laravel-msgraph-mail)[mailcarrier/mailcarrier

Mailing platform with templates and logs included

1631.7k](/packages/mailcarrier-mailcarrier)[hafael/azure-mailer-driver

Supercharge your Laravel or Symfony app with Microsoft Azure Communication Services (ACS)! Effortlessly add email, chat, voice, video, and telephony-over-IP for next-level communication. 🚀

14101.1k](/packages/hafael-azure-mailer-driver)

PHPackages © 2026

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