PHPackages                             stechstudio/laravel-email-events - 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. stechstudio/laravel-email-events

Abandoned → [stechstudio/laravel-postmaster](/?search=stechstudio%2Flaravel-postmaster)Library[Mail &amp; Notifications](/categories/mail)

stechstudio/laravel-email-events
================================

Handle email event webhooks

0.14(1mo ago)16.7k1[3 issues](https://github.com/stechstudio/laravel-email-events/issues)MITPHPPHP ^8.2CI passing

Since Dec 24Pushed 1mo ago4 watchersCompare

[ Source](https://github.com/stechstudio/laravel-email-events)[ Packagist](https://packagist.org/packages/stechstudio/laravel-email-events)[ Docs](https://github.com/stechstudio/laravel-email-events)[ RSS](/packages/stechstudio-laravel-email-events/feed)WikiDiscussions master Synced today

READMEChangelog (7)Dependencies (9)Versions (14)Used By (0)

> # 📦 This package has moved
>
> [](#-this-package-has-moved)
>
> `stechstudio/laravel-email-events` has been renamed to **[`stechstudio/laravel-postmaster`](https://github.com/stechstudio/laravel-postmaster)**.
>
> Version `0.14` (documented below) is the final release under this name. It will keep working, but all new development — including persistence, multitenancy, and additional providers — happens in the new package.
>
> To upgrade:
>
> ```
> composer remove stechstudio/laravel-email-events
> composer require stechstudio/laravel-postmaster
> ```
>
>
>
> The namespace, config, and env names changed in the new package — see the [laravel-postmaster README](https://github.com/stechstudio/laravel-postmaster#readme) for setup.

---

Email event webhook processing
==============================

[](#email-event-webhook-processing)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9fb4555cebca4e4c1663220269cdae66361110e07c79d63ab7e337d99d075878/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f737465636873747564696f2f6c61726176656c2d656d61696c2d6576656e74732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stechstudio/laravel-email-events)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

So you have your Laravel app sending email out through SendGrid or Mailgun or Postmark, super. Now you want to capture webhooks and react to email events, such as deliveries or bounces. This is where it can get a bit messy, authorizing the webhook submission, parsing the payload, handling the details... and then of course you've tied yourself to one particular email provider.

This package greatly simplifies the process. It will accept webhook submissions from any supported email provider, authorize the submission, generalize it to a standard data format, and fire off a Laravel event. Now all you have to do is listen for an event and go!

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

[](#installation)

Via Composer

```
$ composer require stechstudio/laravel-email-events
```

Quick start
-----------

[](#quick-start)

### 1. Add the routes

[](#1-add-the-routes)

In your `routes/web.php` file add:

```
EmailEvents::routes();
```

This will wire up a route at `.hooks/email-events/{provider}`.

### 2. Configure your auth method

[](#2-configure-your-auth-method)

There are multiple authorization options available. The default option (and works with any provider) is just a URL token.

In your app .env file set a token secret:

```
MAIL_EVENTS_AUTH_TOKEN=mysecrettoken

```

### 3. Configure your mail provider with your webhook endpoint

[](#3-configure-your-mail-provider-with-your-webhook-endpoint)

Log in to your email provider account, find the webhook section, and add your URL endpoint. Make sure to specify the provider name, and include the auth token.

For example, if you are using SendGrid you would go to the [Mail Settings](https://app.sendgrid.com/settings/mail_settings) page, turn on the "Event Notification" setting, check all the actions that you care about, and provide your POST URL:

```
https:///.hooks/email-events/sendgrid?auth=mysecrettoken

```

> Note while in local/development mode you can use [`valet share`](https://laravel.com/docs/master/valet#sharing-sites) to get a publicly accessible domain for your app.

### 4. Listen for the event

[](#4-listen-for-the-event)

Lastly, you need to listen for an email event in your app. Setup an [event listener](https://laravel.com/docs/master/events#defining-listeners) and listen for `STS\EmailEvents\EmailEvent`.

Something like this:

```
namespace App\Listeners;

use STS\EmailEvents\EmailEvent;

class NotifyBouncedEmail {

    public function handle(EmailEvent $event)
    {
        // I only care about bounces
        if($event->getAction() != EmailEvent::EVENT_BOUNCED) {
            return;
        }

        // Ok so we have an email bounce! Need to go handle that. Maybe notify us on Slack?
        // ...
    }

}
```

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance71

Regular maintenance activity

Popularity24

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 96.7% 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 ~195 days

Recently: every ~111 days

Total

13

Last Release

45d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/315be5f111b5501a41b99a0205c9c85915335391168a0ed10316546a1a38bbd8?d=identicon)[jszobody](/maintainers/jszobody)

---

Top Contributors

[![jszobody](https://avatars.githubusercontent.com/u/203749?v=4)](https://github.com/jszobody "jszobody (29 commits)")[![RPillz](https://avatars.githubusercontent.com/u/9386244?v=4)](https://github.com/RPillz "RPillz (1 commits)")

---

Tags

emaillaravelpostmarksendgridwebhookslaravelsendgridwebhookspostmarkEmail Events

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/stechstudio-laravel-email-events/health.svg)

```
[![Health](https://phpackages.com/badges/stechstudio-laravel-email-events/health.svg)](https://phpackages.com/packages/stechstudio-laravel-email-events)
```

###  Alternatives

[propaganistas/laravel-disposable-email

Disposable email validator

6023.0M7](/packages/propaganistas-laravel-disposable-email)[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4079.9M1](/packages/s-ichikawa-laravel-sendgrid-driver)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

254168.5k](/packages/erag-laravel-disposable-email)

PHPackages © 2026

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