New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

designmynight/laravel-log-mailer

A package to support logging via email in Laravel
43,790 15
Install
composer require designmynight/laravel-log-mailer
Latest Version:v2.1.0
PHP:^8.3
Laravel:6 · 7
Older releases:5
License:MIT
Last Updated:Oct 22, 2026
Links: GitHub  ·  Packagist
Maintainer: danjohnson95

Laravel Mail Logger

Latest Stable Version Total Downloads StyleCI License: MIT

A service provider to add support for logging via email using Laravels built-in mail provider

image

Table of contents

Installation

Installation using composer:

composer require designmynight/laravel-log-mailer

Laravel version Compatibility

Laravel Package
5.6.x 1.0.x

And add the service provider in config/app.php:

DesignMyNight\Laravel\Logging\MailableLogServiceProvider::class,

For usage with Lumen, add the service provider in bootstrap/app.php.

$app->register(DesignMyNight\Laravel\Logging\MailableLogServiceProvider::class);

Configuration

Most configuration options can be automatically populated by environment variables or in config/mailablelog.php, to generate it run php artisan vendor:publish.

To ensure all unhandled exceptions are mailed, set up a mail logging channel and add it to your logging stack in config/logging.php:

'channels' => [
    'stack' => [
        'driver' => 'stack',
        // Add mail to the stack:
        'channels' => ['single', 'mail'],
    ],

    // ...

    // Create a mail logging channel:
    'mail' => [
        'driver' => 'mail',
        // Specify who to mail the log to
        'to' => [
            [
                'address' => 'errors@designmynight.com',
                'name' => 'Error'
            ]
        ],
        // Optionally specify who the log mail was sent by
        // This is overidable in config/mailablelog.php and
        // falls back to your global from in config/mail.php
        'from' => [
            'address' => 'errors@designmynight.com',
            'name' => 'Errors'
        ],
        // Optionally overwrite the mailable template
        // 'mailable' => NewLogMailable::class
    ],
],

You can specify multiple channels and change the recipients and customise the email template per channel.

Related Packages

goedemiddag/betterstack-logs

Monolog handler for Better Stack Logs

544,449 6
edujugon/laravel-log

Simple API to write logs for Laravel.

11,018 19
lancodev/laravel-logging

This is my package laravel-logging

1,202 0
triadev/laravel-logger-provider

A laravel service provider for logging.

199 0

Version History

Version Released Laravel License
v2.1.0 ^6.0 || ^7.0 MIT
v2.0.0 ^6.0 MIT
v1.0.2 ^5.6 MIT
v1.0.1 ^5.6 MIT
v1.0.0 ^5.6 MIT