Looking to hire Laravel developers? Try LaraJobs

laravel-mandrill maintained by homicity

Description
A laravel mail macro to use mandrill templates
Author
Last update
2019/04/11 14:22 (dev-master)
License
Links
Downloads
2 952

Comments
comments powered by Disqus

Installation

composer require homicity/laravel-mandrill

Then publish the config file

php artisan vendor:publish --provider="Homicity\MandrillMailable\Providers\MandrillMailableServiceProvider" --tag="config"

Config

Add into your .env file

MANDRILL_SECRET={your mandrill api key}
MANDRILL_FROM_EMAIL={your from email address}
MANDRILL_FROM_NAME={your from name}

Usage

Mail::mandrill()
    ->to('john@example.com')
    ->name('John Doe')
    ->templateName('template-name')
    ->fromEmail('no-reply@example.com')
    ->fromName('Example Website')
    ->subject('Hello Mandrill')
    ->send();