aw-studio / laravel-maillog
Automatically log information about all outgoing mail in your Laravel application.
Installs: 1 992
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/aw-studio/laravel-maillog
Requires
- illuminate/contracts: ^8.0|^9.0|^10.0|^11.0
- illuminate/database: ^8.0|^9.0|^10.0|^11.0
- illuminate/mail: ^8.0|^9.0|^10.0|^11.0
- illuminate/support: ^8.0|^9.0|^10.0|^11.0
Requires (Dev)
- laravel/pint: ^1.16
- orchestra/testbench: ^9.1
- pestphp/pest: ^2.34
- spatie/laravel-ray: ^1.36
This package is auto-updated.
Last update: 2025-10-08 13:11:42 UTC
README
Automatically log information about all outgoing mail in your Laravel application
Setup
You can install the package via composer:
composer require aw-studio/laravel-maillog
Your application will now log outgoing email information to a maillog.log file
in the storage/logs folder.
Configuration
Log to Database
Additionally, if you want to log your outgoing mails to your database, you may do so with the following steps:
Publishing the package configuration and database migrations
php artisan vendor:publish --provider="AwStudio\Maillog\MaillogServiceProvider"
Run the migrations
php artisan migrate
Update the channels config in config/maillog.php:
'channels' => [ // 'log', 'database', ],
Sending Event
By default, this package is configured so that it only logs when mails have been sent. You can change the configuration so that sending is also logged. This generates very similar data records, but can be useful to be able to trace whether problems have occurred on the way and the dispatch has failed unexpectedly.
'logs' => [ 'sent', 'sending', ],