Download the PHP package cleaniquecoders/mailhistory without Composer
On this page you can find all versions of the php package cleaniquecoders/mailhistory. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cleaniquecoders/mailhistory
More information about cleaniquecoders/mailhistory
Files in cleaniquecoders/mailhistory
Package mailhistory
Short Description Keep track all the emails sent in the your Laravel application.
License MIT
Homepage https://github.com/cleaniquecoders/mailhistory
Informations about the package mailhistory
Mail History
This package will allow you to capture any mail send out either using Mail or Notification features in Laravel.
Installation
You can install the package via composer:
You can publish and run the migrations with:
If you need to configure more, do publish the config file and update the config file as neccessary.
Usage
We need to configure two parts - Mail & Notification.
All mails are required to use mail metadata trait.
And in your mail constructor, do call the following method:
With this setup, we can track which email has been sent or still sending.
Notification
Do configure you mail prior to this step. At the moment, it only works with Mailable, not Mail Message class.
For notifications classes, you will need to add the following trait:
Then in your notification constructor, you need to initialise the mail object.
And update the toMail()
as following:
Artisan Commands
If you need to clean up your mail history table, you can run:
If you need to test the mail or notification:
Do take note, for mail testing, you need a user record that have the email address as we are using Notifiable trait.
You may run the test using specified queue:
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Nasrul Hazim Bin Mohamad
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of mailhistory with dependencies
cleaniquecoders/traitify Version ^1.0
illuminate/contracts Version ^10.0 | ^11.0
spatie/laravel-package-tools Version ^1.14.0