PHPackages                             cleaniquecoders/mailhistory - 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. cleaniquecoders/mailhistory

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

cleaniquecoders/mailhistory
===========================

Keep track all the emails sent in the your Laravel application.

3.0.0(1mo ago)21.8k[4 PRs](https://github.com/cleaniquecoders/mail-history/pulls)MITPHPPHP ^8.2|^8.3|^8.4CI failing

Since Apr 5Pushed 1mo agoCompare

[ Source](https://github.com/cleaniquecoders/mail-history)[ Packagist](https://packagist.org/packages/cleaniquecoders/mailhistory)[ Docs](https://github.com/cleaniquecoders/mailhistory)[ RSS](/packages/cleaniquecoders-mailhistory/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (27)Versions (19)Used By (0)

Mail History
============

[](#mail-history)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a6b4ffd564c7967ab7f19924a43f88446dfde8dae465212fd6b81ae12cd2e1ff/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636c65616e69717565636f646572732f6d61696c686973746f72792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cleaniquecoders/mailhistory) [![PHPStan](https://github.com/cleaniquecoders/mail-history/actions/workflows/phpstan.yml/badge.svg)](https://github.com/cleaniquecoders/mail-history/actions/workflows/phpstan.yml) [![run-tests](https://github.com/cleaniquecoders/mail-history/actions/workflows/run-tests.yml/badge.svg)](https://github.com/cleaniquecoders/mail-history/actions/workflows/run-tests.yml) [![Fix PHP code style issues](https://github.com/cleaniquecoders/mail-history/actions/workflows/fix-php-code-style-issues.yml/badge.svg)](https://github.com/cleaniquecoders/mail-history/actions/workflows/fix-php-code-style-issues.yml) [![Total Downloads](https://camo.githubusercontent.com/77f9152dabaff3da616a5b0c1ee0e41b210c35d20a2457305386821d6b24df0f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636c65616e69717565636f646572732f6d61696c686973746f72792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cleaniquecoders/mailhistory)

A Laravel package for automatically tracking emails sent through Mail and Notification features. Capture email metadata, monitor delivery status, and maintain a complete history of your application's email communications.

Features
--------

[](#features)

- 🚀 **Automatic Tracking** - Captures email metadata without changing existing code
- 📊 **Status Monitoring** - Tracks email lifecycle from "Sending" to "Sent"
- 🔍 **Hash-based Identification** - Unique identifiers for each email
- ⚡ **Queue Support** - Works seamlessly with Laravel's queue system
- 🎯 **Mailable &amp; Notification Support** - Track both mail types
- 🛠️ **Artisan Commands** - Built-in testing and maintenance tools

Quick Start
-----------

[](#quick-start)

### Installation

[](#installation)

```
composer require cleaniquecoders/mailhistory
php artisan vendor:publish --tag="mailhistory-migrations"
php artisan migrate
```

### Basic Usage

[](#basic-usage)

Add the trait to your Mailable:

```
use CleaniqueCoders\MailHistory\Concerns\InteractsWithMailMetadata;

class WelcomeMail extends Mailable
{
    use InteractsWithMailMetadata;

    public function __construct()
    {
        $this->configureMetadataHash();
    }
}
```

That's it! Your emails are now being tracked automatically.

Documentation
-------------

[](#documentation)

Comprehensive documentation is available in the `docs/` directory:

### 📚 [Complete Documentation](./docs/README.md)

[](#-complete-documentation)

- **[Getting Started](./docs/01-getting-started/README.md)** - Installation, configuration, and quick start
- **[Usage Guide](./docs/02-usage/README.md)** - Mail tracking, notifications, and commands
- **[Architecture](./docs/03-architecture/README.md)** - Technical deep-dive and design patterns
- **[Advanced Topics](./docs/04-advanced/README.md)** - Custom hashes, testing, and troubleshooting

### Quick Links

[](#quick-links)

- [Installation Guide](./docs/01-getting-started/01-installation.md)
- [Configuration](./docs/01-getting-started/02-configuration.md)
- [Mail Tracking](./docs/02-usage/01-mail-tracking.md)
- [Notification Tracking](./docs/02-usage/02-notification-tracking.md)
- [Artisan Commands](./docs/02-usage/03-artisan-commands.md)
- [Troubleshooting](./docs/04-advanced/03-troubleshooting.md)

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- Laravel 9.x, 10.x, or 11.x

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)

- [Nasrul Hazim Bin Mohamad](https://github.com/nasrulhazim)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance91

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 78.8% 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 ~91 days

Recently: every ~185 days

Total

13

Last Release

41d ago

Major Versions

1.4.0 → 2.0.02024-02-15

2.4.0 → 3.0.02026-04-01

PHP version history (4 changes)1.0.0PHP ^8.1

2.1.0PHP ^8.1 | ^8.2 | ^8.3

2.2.0PHP ^8.2 | ^8.3

2.3.0PHP ^8.2|^8.3|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/b57069d0f4b634f65eccc6e5d5848990e25968d45ec2cf46d626c6a4658f944b?d=identicon)[nasrulhazim.m](/maintainers/nasrulhazim.m)

---

Top Contributors

[![nasrulhazim](https://avatars.githubusercontent.com/u/10341422?v=4)](https://github.com/nasrulhazim "nasrulhazim (89 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (13 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (11 commits)")

---

Tags

historylaravelmaillaravelcleaniquecodersmailhistory

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/cleaniquecoders-mailhistory/health.svg)

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

###  Alternatives

[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[xammie/mailbook

Laravel Mail Explorer

482458.3k1](/packages/xammie-mailbook)[spatie/laravel-notification-log

Log notifications sent by your Laravel app

207902.8k](/packages/spatie-laravel-notification-log)[wnx/laravel-sends

Keep track of outgoing emails in your Laravel application.

200427.3k](/packages/wnx-laravel-sends)[spatie/laravel-discord-alerts

Send a message to Discord

151408.0k](/packages/spatie-laravel-discord-alerts)[backstage/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24157.5k5](/packages/backstage-laravel-mails)

PHPackages © 2026

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