Download the PHP package masterro/laravel-mail-viewer without Composer
On this page you can find all versions of the php package masterro/laravel-mail-viewer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-mail-viewer
Laravel Mail Viewer
Easily log, view, and search outgoing emails directly in your browser.
This package logs all outgoing emails to a database and provides a web interface to view them, formatted as they appear in modern email clients like Gmail.
- Laravel Mail Viewer
- Features
- Installation
- Step 1: Install via Composer
- Step 2: Publish Assets & Configurations
- Step 3: Run Migrations
- Step 4: View Emails
- Configuration
- Data Pruning
- Production Usage
- Restrict Access with Middleware
- Disable package in production mode
- Disable auto-discovery:
- Register package for non-production environments
- License
- Credits
Features
- Logs all outgoing emails to the database
- Modern in-browser email viewer
- Searchable UI with auto-refreshing entries
- Configurable route and access protection
- Optional email pruning
Installation
Step 1: Install via Composer
Run the following command in your terminal:
Step 2: Publish Assets & Configurations
Step 3: Run Migrations
Step 4: View Emails
Visit /_mail-viewer in your browser to access the email viewer.
Note: The route can be customized in the configuration file.
Configuration
You can adjust default settings in the config/mail-viewer.php file.
Data Pruning
The package supports Laravel's Model Pruning. Define how many days emails should be retained in the configuration:
Production Usage
By default, the email viewer is publicly accessible. In a production environment, it's highly recommended to restrict access using middleware or something like Access Screen package. Alternatively, you can disable the package in production environments.
Restrict Access with Middleware
Modify your config/mail-viewer.php to apply authorization:
Note:
viewMailLogsis just an example ability you can register via Laravel’s Authorization Gate. This ability is not included in the package.
You can also limit access by IP address in App\Http\Middleware\RestrictMailViewerAccess.php:
Apply it in config:
Now, only authorized users or allowed IPs can access the mail viewer.
Disable package in production mode
Disable auto-discovery:
Register package for non-production environments
In your application's ServiceProvider
License
This package is open-source software licensed under the MIT license.
Credits
Developed by MasterRO.
All versions of laravel-mail-viewer with dependencies
illuminate/database Version ^10.0|^11.0|^12.0 | ^13.0
illuminate/events Version ^10.0|^11.0|^12.0 | ^13.0
illuminate/mail Version ^10.0|^11.0|^12.0 | ^13.0
illuminate/routing Version ^10.0|^11.0|^12.0 | ^13.0
illuminate/support Version ^10.0|^11.0|^12.0 | ^13.0
illuminate/view Version ^10.0|^11.0|^12.0 | ^13.0
nesbot/carbon Version >=2.62.1
opcodesio/mail-parser Version ^0.2.1