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

AbandonedLibrary

desmart/laravel-mailer
======================

Prevents from sending email on dev/staging environments.

1.2.0(11y ago)259MITPHPPHP &gt;=5.4.0

Since Nov 7Pushed 11y ago13 watchersCompare

[ Source](https://github.com/DeSmart/laravel-mailer)[ Packagist](https://packagist.org/packages/desmart/laravel-mailer)[ RSS](/packages/desmart-laravel-mailer/feed)WikiDiscussions master Synced 1mo ago

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

[![Build Status](https://camo.githubusercontent.com/5686a45258fda3ea93664e85d279c310a0c55ed057d1301d6862880c0d36790c/68747470733a2f2f7472617669732d63692e6f72672f4465536d6172742f6c61726176656c2d6d61696c65722e737667)](https://travis-ci.org/DeSmart/laravel-mailer)[![Total Downloads](https://camo.githubusercontent.com/939e8eb50921c50998b366bb658ed9562cc18d7fef415e5c13e7b1dc37cf2805/68747470733a2f2f706f7365722e707567782e6f72672f4465536d6172742f6c61726176656c2d6d61696c65722f646f776e6c6f6164732e737667)](https://packagist.org/packages/DeSmart/laravel-mailer)[![License](https://camo.githubusercontent.com/faaa4ab8464fdc697e689f65f1f1843327469e6eb1223453f2b38dd40aa0528e/68747470733a2f2f706f7365722e707567782e6f72672f4465536d6172742f6c61726176656c2d6d61696c65722f6c6963656e73652e737667)](https://packagist.org/packages/DeSmart/laravel-mailer)

desmart/laravel-mailer
======================

[](#desmartlaravel-mailer)

Did you by mistake send e-mails from dev machine to production users? We did.

To prevent this situations we created a simple catch-all extension for default Laravel mailer. It will send e-mails only to whitelisted addresses (or to a fallback e-mail address).

This package is meant only for dev/test/staging environments.

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

[](#installation)

1. Add package to composer: `composer require "desmart/laravel-mailer:1.2.*"`
2. Publish configuration: `php artisan vendor:publish`
3. Edit configuration file: `config/desmart-laravel-mailer.php`
4. **Replace** `Illuminate\Mail\MailServiceProvider` with `DeSmart\LaravelMailer\MailServiceProvider`

How it works?
-------------

[](#how-it-works)

When mailer is enabled it replaces default `\Illuminate\Mail\Mailer`. Every `to()`, `cc()`, `bcc()` method call will be intercepted.

If e-mail address is not in whitelist (note: we only do whitelists by domain so be careful with this) it will be changed to `desmart-laravel-mailer.email` address.

That way every e-mail sent by Laravel will be redirected only to trusted users.

Laravel compatibility
---------------------

[](#laravel-compatibility)

This package should not break compatibility with Laravel Mailer.

### Laravel 4.2

[](#laravel-42)

To use `desmart/laravel-mailer` with Laravel 4.2 switch version to `1.1.*`

### Laravel 4.1

[](#laravel-41)

To use `desmart/laravel-mailer` with Laravel 4.1 switch version to `1.0.*`

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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

Every ~20 days

Total

6

Last Release

4099d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/488bdbbb3187d1f4f6d9c92f0c716ad413f5e7fe53d3ec5ffefb37cfcad4ecf6?d=identicon)[radmen](/maintainers/radmen)

![](https://www.gravatar.com/avatar/92bc27fc8f1cba837cef419eee0fae358f52c804cd5450cf994f9095fa387a5c?d=identicon)[DeSmart](/maintainers/DeSmart)

---

Top Contributors

[![radmen](https://avatars.githubusercontent.com/u/1190255?v=4)](https://github.com/radmen "radmen (5 commits)")

### Embed Badge

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

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

###  Alternatives

[laradumps/laradumps

LaraDumps is a friendly app designed to boost your Laravel PHP coding and debugging experience.

1.3k1.3M29](/packages/laradumps-laradumps)[fedeisas/laravel-mail-css-inliner

Inline the CSS of your HTML emails using Laravel

5974.6M3](/packages/fedeisas-laravel-mail-css-inliner)[s-ichikawa/laravel-sendgrid-driver

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

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[tomasvotruba/bladestan

PHPStan rule for static analysis of Blade templates

363584.5k4](/packages/tomasvotruba-bladestan)[illuminate/notifications

The Illuminate Notifications package.

483.0M967](/packages/illuminate-notifications)[beyondcode/helo-laravel

HELO Laravel debug helper

90360.1k](/packages/beyondcode-helo-laravel)

PHPackages © 2026

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