Download the PHP package shaffe/laravel-mail-log-channel without Composer

On this page you can find all versions of the php package shaffe/laravel-mail-log-channel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-mail-log-channel

Laravel Mail Log Channel

Latest Stable Version Total Downloads License: MIT

Receive detailed error emails from your Laravel application. Plug it into Laravel's logging stack and get notified when things break — with full context, stack trace, SQL queries, and more.

📸 Example email ![screenshot](docs/screenshot.png)

Features

Installation

The package auto-registers its service provider.

Compatibility

Laravel Package
10, 11, 12, 13 ^3.0
5.6 – 13 ^2.0
5.6 ^1.0

Quick Start

Add a mail channel to config/logging.php and include it in your stack:

Add the recipient to your .env:

That's it. Unhandled exceptions at or above the configured level will now arrive in your inbox.

Configuration Reference

All options with their defaults:

Recipient Formats

The to option accepts several formats:

Level-Based Routing

Route error emails to different recipients based on log level. Levels without a configured recipient (and no default) won't send any email.

Level keys also accept Monolog Level enum values or their numeric equivalents:

Rules:

Each level value accepts the same formats as the standard to option (string, array of strings, named array, structured array).

Throttling

Identical errors are automatically deduplicated to prevent inbox flooding. When the same error occurs multiple times within the throttle window, only the first occurrence sends an email.

Enabled by default with a 60-second window.

Fingerprinting

Each log record gets a fingerprint to determine uniqueness:

Record type Fingerprint components
Exception class + code + message + file + line
Plain message channel + level + message

Suppressed Occurrences Counter

When an error is throttled and then reappears after the window expires, the next email includes a notice indicating how many times the error has occurred since it first appeared, along with the timestamp of the first occurrence.

For example: "⚠️ This error has occurred 47 times since 15 Mar 2025 14:30:00 UTC."

This gives you immediate visibility into the scale of a recurring issue without flooding your inbox.

Configuration

Good to Know

SQL Query Logging

The last 10 SQL queries leading up to the error are included in the email, with bindings and execution time. This helps understand the database state at the time of failure.

Disable with:

Editor Links

File paths in error emails are clickable when app.editor is configured. Clicking opens the file at the correct line in your IDE.

Or via .env:

Examples: phpstorm, vscode, vscode-insiders, cursor, sublime, kiro, nova, idea.

Custom URL scheme:

Remote path remapping (when server paths differ from local):

Environment Info

Each error email includes badges showing the application environment, PHP and Laravel versions, server hostname, peak memory usage, and execution time (time elapsed since LARAVEL_START).

This helps identify errors related to resource exhaustion or slow requests at a glance.

Testing Your Configuration

Verify that your mail log channel is properly configured by sending a test email:

Options:

This sends a fake exception through the configured channel so you can confirm recipients, SMTP settings, and throttle behavior without waiting for a real error.

Upgrading

v2 → v3

If you extended HtmlFormatter or parsed the HTML output, review the new format.

Credits

This package is a fork of laravel-log-mailer by Steve Porter.

License

MIT — see LICENSE.


All versions of laravel-mail-log-channel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/bus Version ^10.0|^11.0|^12.0|^13.0
illuminate/cache Version ^10.0|^11.0|^12.0|^13.0
illuminate/contracts Version ^10.0|^11.0|^12.0|^13.0
illuminate/log Version ^10.0|^11.0|^12.0|^13.0
illuminate/mail Version ^10.0|^11.0|^12.0|^13.0
illuminate/queue Version ^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/database Version ^10.0|^11.0|^12.0|^13.0
monolog/monolog Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package shaffe/laravel-mail-log-channel contains the following files

Loading the files please wait ...