2017 © Pedro Peláez
 

library laravel-mail-extras

Extra functionality for sending mail with Laravel

image

foxxmd/laravel-mail-extras

Extra functionality for sending mail with Laravel

  • Wednesday, December 21, 2016
  • by FoxxMD
  • Repository
  • 1 Watchers
  • 1 Stars
  • 3,560 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 18 % Grown

The README.md

Laravel 5 Mail Extras

Add some extra functionality to your mail flow, (*1)

This package extends Laravel 5 Mail by adding:, (*2)

  • Attempt to retry sending mail X times

I'm sure I will be adding more in the future, but that's it for now!, (*3)

Installation

Require this package, (*4)

composer require "foxxmd/laravel-mail-extras"

After adding the package, add the ServiceProvider to the providers array in config/app.php, (*5)

\FoxxMD\LaravelMailExtras\LaravelMailExtrasServiceProvider::class,

Configuration

Simply add this new key/value anywhere in config/mail.php to set the number of retry attempts:, (*6)

'retries' => 3

It defaults to 0 if not present (normal behavior), (*7)

Default behavior for throwing exceptions is also configurable., (*8)

'exceptions' => [
    'mailFailure' => true, // will throw a MailFailureExeption if any exception is thrown during sending mail
    'deliveryFailure' => false // will throw a MailDeliveryException if any recipients fail to recieve mail during delivery
]

These parameters can be overridden using the send method, (*9)

EX Mail::send($view, $data, $callback, $throwOnMailFailure, $throwOnDeliveryFailure), (*10)

Contributing

New functionality is welcomed! Create an issue or submit a PR :), (*11)

License

This package is licensed under the MIT license., (*12)

The Versions