Laravel Mail Log Viewer
2 min read
435 downloads

Installation
composer require dipesh79/laravel-mail-log-viewer
Make sure to change the email configuration to log
MAIL_MAILER=log
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="hello@example.com"
MAIL_FROM_NAME="${APP_NAME}"Publish the vendor file for configuration
php artisan vendor:publish --provider="Dipesh79\LaravelMailLogViewer\LaravelMailLogViewerServiceProvider"
The configuration file looks like this.
<?php
return [
/**
* Route configuration
*
* The configuration for the route of the package.
* This specifies the URL for the dashboard.
*
*/
'dashboard_url' => '/home',
/**
* Pagination configuration
*
* The configuration for the pagination for the mail log viewer.
* This specifies the number of items per page.
*
*/
'pagination' => 6,
/**
* Primary color configuration
*
* The configuration for the primary color for the mail log viewer.
* This specifies the primary color used in the UI.
*
*/
'primary-color' => '#ff2d20',
/**
* Middleware configuration
*
* The configuration for the middleware for the mail log viewer
*/
'middleware' => ['web'],
];Now you can use this url to receive emails.
http://localhost:8000/email-logs
This looks something like this
Note: Your application environment must not be in production in order to use this url.
License: MIT
Author: @Dipesh79
Support: For support, email dipeshkhanal79[at]gmail[dot]com.
