PHPackages                             bwt-team/laravel-error-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. bwt-team/laravel-error-mailer

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

bwt-team/laravel-error-mailer
=============================

Package to send email notification when something goes wrong

v2.0.0(9y ago)16.8kMITPHP &gt;=5.5.9

Since Oct 24Compare

[ Source](https://github.com/bwtgroup/laravel-error-mailer)[ Packagist](https://packagist.org/packages/bwt-team/laravel-error-mailer)[ RSS](/packages/bwt-team-laravel-error-mailer/feed)WikiDiscussions Synced today

READMEChangelogDependencies (3)Versions (4)Used By (0)

English description | [Russian description](README_RU.md)

Laravel 5 Error Mailer
======================

[](#laravel-5-error-mailer)

[![Latest Stable Version](https://camo.githubusercontent.com/5b1c8047d3413dbedca3e453338b47896965d7a328485edb1d86e2f49656c874/68747470733a2f2f706f7365722e707567782e6f72672f6277742d7465616d2f6c61726176656c2d6572726f722d6d61696c65722f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/bwt-team/laravel-error-mailer)[![Latest Unstable Version](https://camo.githubusercontent.com/bd7fb5ac1e8435c096249877f4ccea4ed1c42f13ee87dbbb61730c4a4818a560/68747470733a2f2f706f7365722e707567782e6f72672f6277742d7465616d2f6c61726176656c2d6572726f722d6d61696c65722f762f756e737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/bwt-team/laravel-error-mailer#dev-develop)[![License](https://camo.githubusercontent.com/09173b5351f73795131f0f2d933ec8bd074225a72c36d152ad6ae1bf4e4d889e/68747470733a2f2f706f7365722e707567782e6f72672f6277742d7465616d2f6c61726176656c2d6572726f722d6d61696c65722f6c6963656e73653f666f726d61743d666c61742d737175617265)](LICENSE.md)

This package allows to enable and set up email alerts in case errors appear.

### Contents

[](#contents)

- [Setup](#setup)
- [Setup in Laravel](#setup-in-laravel)
- [Setup in Lumen](#setup-in-lumen)
- [License](#license)

### Setup

[](#setup)

Setup this package with composer using the following command:

```
composer require bwt-team/laravel-error-mailer
```

### Setup in Laravel

[](#setup-in-laravel)

After composer update add service provider into `providers` in `config/app.php`.

```
BwtTeam\LaravelErrorMailer\Providers\ErrorMailerServiceProvider::class
```

This service provider will enable with an option to publish config file to update package settings depending on your needs. After publication this service provider can be disabled, it is not needed for package work. For publication please use:

```
php artisan vendor:publish --provider="BwtTeam\LaravelErrorMailer\Providers\ErrorMailerServiceProvider" --tag=config
```

Also, to make package work please register the setup class in `bootstrap/app.php`. Registration should happen before Application sample is returned.

```
$app->bind(
    \Illuminate\Foundation\Bootstrap\ConfigureLogging::class,
    \BwtTeam\LaravelErrorMailer\ConfigureLogging::class
);
```

### Setup in Lumen

[](#setup-in-lumen)

To send email messages you can use laravel component or create a class for sending yourself by initializing class, which implements \\Swift\_Transport interface. To set up laravel component:

- setup component using the following command: `    composer require illuminate/mail    `
- copy [config file](https://github.com/laravel/laravel/blob/master/config/mail.php) into `config` directory, which is stored in root catalogue (or create the directory yourself).
- Copy config file `vendor/bwt-team/laravel-error-mailer/config/error-mailer.php` into config directory, which is stored in root directory (or create it yourself if it is missing) and set it up according to your needs.
- enable service provider in `bootstrap/app`. `    $app->register(\Illuminate\Mail\MailServiceProvider::class);    `
- setup settings from configuration file. `    $app->configure('mail');     $app->configure('error-mailer');    `

To enable sending email alerts you need to create a class instance `\BwtTeam\LaravelErrorMailer\Configurators\MailConfigurator` in `bootstrap/app`, its constructor looks like following:

```
 public function __construct($subject, $to, $from, array $processors = [], $logLevel = Logger::ERROR, \Swift_Transport $sendmailTransport = null)

```

This class is responsible for sending alert emails by mail but enabling it will disable writing logs into file, which is enabled in lumen by default. In order not to disable writing you need to create a class instance `\BwtTeam\LaravelErrorMailer\Configurators\FileConfigurator`. Class constructor looks like the following:

```
 public function __construct($file = null, $logLevel = Logger::DEBUG)

```

After that you need to pass this instance into `with` method in `\BwtTeam\LaravelErrorMailer\Configurators\MailConfigurator`class. Each configuration class has options to work with monologue processors. For this you need to pass process instance to class name into constructor or add with the help of `addProcessors` method. In addition to standard monologue processors, the following out-of-box processors are available:

```
 \BwtTeam\LaravelErrorMailer\Processors\SqlProcessor::class,
 \BwtTeam\LaravelErrorMailer\Processors\PostDataProcessor::class,
 \BwtTeam\LaravelErrorMailer\Processors\HeadersProcessor::class,
```

When component is set up you need to pass it to `configureMonologUsing` method in Application class before it is returned.
Final setup will look like this:

```
$configurator = new \BwtTeam\LaravelErrorMailer\Configurators\MailConfigurator('subject', 'to@example.com', 'from@example.com');
$configurator->setSendmailTransport(\Swift_MailTransport::newInstance());
$configurator->addProcessors([
     \BwtTeam\LaravelErrorMailer\Processors\SqlProcessor::class,
     \BwtTeam\LaravelErrorMailer\Processors\PostDataProcessor::class,
     \BwtTeam\LaravelErrorMailer\Processors\HeadersProcessor::class,
     \Monolog\Processor\WebProcessor::class
]);
$configurator->with(new \BwtTeam\LaravelErrorMailer\Configurators\FileConfigurator());
$app->configureMonologUsing($configurator);

```

### License

[](#license)

This package is using [MIT](LICENSE.md).

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

Total

2

Last Release

3430d ago

Major Versions

v1.0.0 → v2.0.02017-02-07

### Community

Maintainers

![](https://www.gravatar.com/avatar/d8706e19b2613bd9a54b4e7bab80e6e3f719ea68002db68ebaba6e1eaf93d1e0?d=identicon)[BWT group](/maintainers/BWT%20group)

---

Tags

laravelmaillumenerror

### Embed Badge

![Health badge](/badges/bwt-team-laravel-error-mailer/health.svg)

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

###  Alternatives

[propaganistas/laravel-disposable-email

Disposable email validator

6012.9M7](/packages/propaganistas-laravel-disposable-email)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[laravel/ai

The official AI SDK for Laravel.

1.0k2.1M163](/packages/laravel-ai)[mateusjunges/laravel-kafka

A kafka driver for laravel

7243.4M20](/packages/mateusjunges-laravel-kafka)[moonshine/moonshine

Laravel administration panel

1.3k239.9k76](/packages/moonshine-moonshine)[illuminate/log

The Illuminate Log package.

6225.0M603](/packages/illuminate-log)

PHPackages © 2026

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