Download the PHP package binarybuilds/laravel-mail-manager without Composer
On this page you can find all versions of the php package binarybuilds/laravel-mail-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download binarybuilds/laravel-mail-manager
More information about binarybuilds/laravel-mail-manager
Files in binarybuilds/laravel-mail-manager
Package laravel-mail-manager
Short Description A Laravel mail manager to record and re-send all outgoing emails.
License MIT
Informations about the package laravel-mail-manager
Laravel Mail Manager
A laravel package to easily resend system generated emails without going through entire application flow.
This package does not provide any UI. If you are looking for a UI wrapper, See laravel nova mail manager
How It Works?
This package will store all outgoing emails inside database and will track their status if they are successfully sent or not.
You can resend all unsent emails, Or resend specific emails if your client requests you to resend an email.
This package will only mark the status of emails whether they are sent or not. This package cannot determine whether the sent mail reached the user's email. So If a mail is marked as unsent, It means an error occured while sending the mail. It might be due to ratelimit on the email sender, Invalid email credentials, etc. Do not assume the status of sent as a successful email delivery.
Installation
This package can be installed using composer.
Next you must register the package's service provider by adding the below line to providers
array inside config/app.php
file.
Conflicts With Laravel Telescope
This package currently conflicts with laravel telescope. If you are using laravel telescope in your application, Make sure you register this package service provider after the telescope service provider is registered.
If you are registering telescope using config/app.php
file, Then add the service provider after the telescope service provider as shown below.
If you are registering telescope manually using AppServiceProvider.php
file, Then register this package service provider after the telescope service provider is registered as shown below
Next, Publish the package configuration file by running
Run migrations to create the table required to store the emails.
This will create a table mail_manager_mails
. You can configure the table name using the published configuration file located in config/mail_manager.php
Usage
By default this package records all the outgoing mailables and notifications.
Ignoring Mailables And Notifications From Being Recorded
If you wish to ignore certain mailables or notifications from being recorded,
You can add them to ignore
array in config/mail_manager.php
file.
Resending Mails
You can resend any mail by using the following command
Here 1 represents the ID of the mail to resend.
Resending All Un-Sent Mails
If you wish to resend all the mails which are unsent, You can use the following artisan command
Since this command will only resend the mails which are failed to send, You can safely schedule this command to resend your failed emails.
Deleting Older Entries
Since this package records all outgoing emails, Your database table will start growing quickly. To automatically delete older entires, This package provides an artisan command to schedule deletion of older entries.
You can schedule deletion of older entries by adding the following line to your scheduler.
This will delete all entries which are older than 72 hours.
Contributing
Thank you for considering contributing to Laravel mail manager! Please create a pull request with your contributions with detailed explanation of the changes you are proposing.
License
This package is open-sourced software licensed under the MIT license.