PHPackages                             michaelgrimshaw/laravel-email-tracker - 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. michaelgrimshaw/laravel-email-tracker

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

michaelgrimshaw/laravel-email-tracker
=====================================

A package to track sent mail and listen to webhook events

1.0.5(4y ago)91.8k4[2 issues](https://github.com/michaelgrimshaw/laravel-email-tracker/issues)MITPHPPHP ~5.6|~7.0

Since Jun 10Pushed 4y agoCompare

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

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

Laravel Email Tracker
=====================

[](#laravel-email-tracker)

This package allows you to track sent mail and query sent mail statistics.

Once installed you can do stuff like this:

```
$user  = User::find(1);
$order = Order::find(1);
Mail::to($user)
    ->linkedTo($order)
    ->category('Order Verification')
    ->send(new testMail()));
```

By adding a trait you can access history sending history for a recipient or model.

```
// Get emails history sent to a user
$user->recipientHistory;
// Get emails history linked to a order
$order->mailableHistory;
```

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

[](#installation)

### Laravel

[](#laravel)

This package can be used in Laravel 5.5 or higher.

You can install the package via composer:

```
composer require michaelgrimshaw/laravel-email-tracker
```

In Laravel 5.5 the service provider will automatically get registered. In older versions of the framework just add the service provider in `config/app.php` file:

```
'providers' => [
    // ...
    MichaelGrimshaw\MailTracker\MailTrackerServiceProvider::class,
];
'aliases' => [
    // ...
    'Mail' => MichaelGrimshaw\MailTracker\Facades\Mail::class,
    'MailStats' => MichaelGrimshaw\MailTracker\Facades\MailStats::class,
];
```

You can create the mail history tables by running the migrations:

```
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --provider="MichaelGrimshaw\MailTracker\MailTrackerServiceProvider" --tag="config"
```

Usage
-----

[](#usage)

First, add the `MichaelGrimshaw\MailTracker\TrackableTrait` trait to your `User` model(s) and link model(s):

```
use Illuminate\Foundation\Auth\User as Authenticatable;
use MichaelGrimshaw\MailTracker\TrackableTrait;

class User extends Authenticatable
{
    use TrackableTrait;

    // ...
}
```

### Methods

[](#methods)

This now gives you access to extra functions when sending which can be used to control the tracking.

```
linkedTo(object)
```

Pass in a model object to link the mail.

```
category(string)
```

Pass a string to add a category to the tracked mail.

```
tracked(bool)
```

As default, mail will always be tracked. You can use the tracked method to turn tracking on or off.

### Tracking Events

[](#tracking-events)

The default webhook url is /api/email-tracker/event-hook. You can customise the route:

```
Route::post('custome-route', MailTrackerController::class . '@processEvent');
```

When the webhook is processed one of the following events are called:

```
// Events
'mail.event'
'mail.processed'
'mail.dropped'
'mail.delivered'
'mail.deferred'
'mail.bounce'
'mail.open'
'mail.click'
'mail.spamreport'
'mail.group_unsubscribe'
'mail.group_resubscribe'
```

### Changelog

[](#changelog)

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

Contributing
------------

[](#contributing)

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

### Security

[](#security)

If you discover any security-related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

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

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.5% 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 ~143 days

Recently: every ~149 days

Total

6

Last Release

1812d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/71ad751f3361307f342cb9dd2400eccc619f200a2444832f36c1c732c81f4582?d=identicon)[michaelgrimshaw](/maintainers/michaelgrimshaw)

---

Top Contributors

[![michaelgrimshaw](https://avatars.githubusercontent.com/u/44654639?v=4)](https://github.com/michaelgrimshaw "michaelgrimshaw (21 commits)")[![danijelk](https://avatars.githubusercontent.com/u/580753?v=4)](https://github.com/danijelk "danijelk (1 commits)")

---

Tags

laravelemailsendgridsparkposttrackerEmail tracker

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/michaelgrimshaw-laravel-email-tracker/health.svg)

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

###  Alternatives

[s-ichikawa/laravel-sendgrid-driver

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

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[propaganistas/laravel-disposable-email

Disposable email validator

5762.6M6](/packages/propaganistas-laravel-disposable-email)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[osiemsiedem/laravel-autolink

A Laravel package for converting URLs in a given string of text into clickable links.

13126.3k](/packages/osiemsiedem-laravel-autolink)

PHPackages © 2026

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