Download the PHP package qodeboy/laravel-mailman without Composer
On this page you can find all versions of the php package qodeboy/laravel-mailman. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-mailman
"Mailman" mail driver for Laravel 5.2+ which allows email delivery to be restricted by environment but allowed for specific recipients.
Installation
Begin by installing the package through Composer. Run the following command in your terminal:
Once composer is done, add the package service provider in the providers array in config/app.php
:
Then publish the config file:
Change MAIL_DRIVER
to mailman
in your .env
file:
Finally, run migrations:
How it works
For every email sent this package will:
- Check if current application environment is allowed to send emails.
- If environment if denied, check if all of recipients are in the exception list.
- Passe email through only if environment is allowed to send emails, or all of the recipients are in exception list.
- Log email to database or filesystem (if configured to do so) along with it's status (allowed/denied).
- Send email through configured "delivery" driver.
Configuration
Delivery driver
Delivery driver used to send emails which passed all checks is configured in mailman.delivery.driver
option:
You can use any driver name here (except of mailman) which Laravel is aware of.
Allowed environments
To configure which environments are allowed to send emails, check mailman.delivery.environments
option:
Each environment added here is allowed to send emails.
Allowed recipients
If you want to lock down environment but still allow some recipients to receive emails, add those addresses to mailman.delivery.recipients
list:
Logging
By default this package will log every email which tries to go through into database. This is configured in mailman.log
option:
If you want to change log storage to simple filesystem log, change mailman.log.storage
option to filesystem
. Filesystem path where to store logs is explained below.
If you want to completely turn off logging, just change mailman.delivery.enabled
to false
.
Logging storage
To customize where each logging driver is storing email logs, check mailman.storage
option:
All versions of laravel-mailman with dependencies
illuminate/support Version ^5.2
illuminate/mail Version ^5.2
illuminate/filesystem Version ^5.2