homicity/laravel-mandrill

A laravel mail macro to use mandrill templates

101 2018-11-21 18:58 UTC

This package is auto-updated.

Last update: 2024-04-11 23:55:38 UTC


README

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();