PHPackages                             salamwaddah/laravel-mandrill-driver - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. salamwaddah/laravel-mandrill-driver

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

salamwaddah/laravel-mandrill-driver
===================================

Mandrill notification channel for Laravel 9, 10, 11, 12, 13

v1.6.0(1mo ago)1177.4k↓65.1%7[1 issues](https://github.com/salamwaddah/laravel-mandrill-driver/issues)MITPHPPHP ^8.0CI failing

Since Jul 23Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/salamwaddah/laravel-mandrill-driver)[ Packagist](https://packagist.org/packages/salamwaddah/laravel-mandrill-driver)[ RSS](/packages/salamwaddah-laravel-mandrill-driver/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (6)Versions (30)Used By (0)

[![Latest Version on Packagist](https://camo.githubusercontent.com/84d76cbc2e7ea9742301f3c3513549aa527eeaded676efe00c4fe9106ecddf03/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73616c616d7761646461682f6c61726176656c2d6d616e6472696c6c2d6472697665722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/salamwaddah/laravel-mandrill-driver)[![Total Downloads](https://camo.githubusercontent.com/dc3c1ba4a2e1745f88e6a97c436b8c16c3b8cc16bfe6e3f6a4842fa7fca82284/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73616c616d7761646461682f6c61726176656c2d6d616e6472696c6c2d6472697665723f7374796c653d666c61742d737175617265)](https://packagist.org/packages/salamwaddah/laravel-mandrill-driver)[![MIT Licensed](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

Installation
------------

[](#installation)

```
composer require salamwaddah/laravel-mandrill-driver

```

Configure
---------

[](#configure)

Add into your .env file

```
MANDRILL_SECRET=YOUR_MANDRILL_API_KEY

```

In your `mail.php` file

```
'from' => [
    'address' => 'noreply@example.com',
    'name' => "From Name"
],

'mandrill' => [
    'key' => env('MANDRILL_SECRET', 'SUPER SECRET KEY')
]

```

Usage
-----

[](#usage)

#### Basic usage

[](#basic-usage)

```
public function via($notifiable)
{
    return [MandrillChannel::class];
}

public function toMandrill($notifiable)
{
    return (new MandrillMessage())
        ->subject('Purchase successful')
        ->addTo($notifiable->email)
        ->view('mandrill-template-name', [
            'product' => $this->product->toArray(),
            'user' => [
                'name' => $notifiable->name,
                'phone' => $notifiable->phone
            ]
        ]);
}
```

#### Advanced

[](#advanced)

```
public function toMandrill($notifiable)
{
    return (new MandrillMessage())
        ->subject('Purchase successful')
        ->templateName('mandrill-template-name')
        ->addTo($notifiable->email)
        ->addTos(['a@example.com', 'b@example.com'])
        ->fromName('Customized From')
        ->fromEmail('custom_from@example.com')
        ->replyTo('reply@example.com')
        ->content([
            'product' => $this->product->toArray(),
        ]);
}
```

Available methods
-----------------

[](#available-methods)

MethodTypeDescription`subject``string`Sets the email subject`templateName``string`Sets template name in Mandrill`addTo``string`Adds a To email`addTos``array`Adds multiple To emails`fromName``string`Overrides the default from name`fromEmail``string`Overrides the default from email`content``array`Content array`replyTo``string`Accepts one parameter(`$email`)`view``function`Accepts 2 params (`$templateName`, `$keyedContentArray`)**Note: To keep it consistent with laravel's `Mail` implementation of `replyTo`, you can pass two parameters, second parameter is ignored, and If `replyTo` is called multiple times only first one will be used and others will be ignored. Because mandrill only allows one email address for reply to.**

Usage in Mandrill (Dynamic Handlebars)
--------------------------------------

[](#usage-in-mandrill-dynamic-handlebars)

When specifying your content in the methods `content` or `view` you can then write in [handlebars syntax](https://mandrill.zendesk.com/hc/en-us/articles/205582537-Using-Handlebars-for-Dynamic-Content) in your Mandrill templates like this;

Hey `{{user.name}}`, you have successfully purchased `{{product.name}}`.

Mailchimp syntax
----------------

[](#mailchimp-syntax)

If you wish to use [Mailchimp Merge Tags](https://mandrill.zendesk.com/hc/en-us/articles/205582787-Mailchimp-Merge-Tags-Supported-in-Mandrill) instead of the dynamic handlebars then you can set the `$mergeLanguage` optional param in `templateName` method to `mailchimp`.

In mailchimp merge tags, arrays are not supported, so each tag only accepts a string. [Full documentation including booked keywords on mandrill](https://mandrill.zendesk.com/hc/en-us/articles/205582787-Mailchimp-Merge-Tags-Supported-in-Mandrill)

#### Mailchimp Example

[](#mailchimp-example)

```
public function toMandrill($notifiable)
{
    return (new MandrillMessage())
        ->subject('Purchase successful')
        ->templateName('mandrill-template-name', 'mailchimp') addTo($notifiable->email)
        ->content([
            'customer_name' => $notifiable->name,
            'invoice_link' => 'http://example.com/download/invoice.pdf',
        ])
}
```

Then in your mandrill template use as follows;

Hi `*|customer_name|*`, you can download your invoice from here `*|invoice_link|*`,

###  Health Score

59

—

FairBetter than 98% of packages

Maintenance88

Actively maintained with recent releases

Popularity39

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 80.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~96 days

Recently: every ~195 days

Total

27

Last Release

50d ago

Major Versions

0.0.7 → 1.02019-07-26

PHP version history (2 changes)1.1.0PHP &gt;=7.0.0

v1.6.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/f49a697f92ca5b498868ced9c24eda225da3a9b83fdf325bbcdffd4c5c376f26?d=identicon)[salamwaddah](/maintainers/salamwaddah)

---

Top Contributors

[![salamwaddah](https://avatars.githubusercontent.com/u/26627088?v=4)](https://github.com/salamwaddah "salamwaddah (54 commits)")[![Joorren](https://avatars.githubusercontent.com/u/22602428?v=4)](https://github.com/Joorren "Joorren (4 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (3 commits)")[![developernaren](https://avatars.githubusercontent.com/u/3628468?v=4)](https://github.com/developernaren "developernaren (2 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (2 commits)")[![saddamhussain734](https://avatars.githubusercontent.com/u/19436104?v=4)](https://github.com/saddamhussain734 "saddamhussain734 (1 commits)")[![wblommaert](https://avatars.githubusercontent.com/u/5678605?v=4)](https://github.com/wblommaert "wblommaert (1 commits)")

---

Tags

laravelmailchimpmandrillmandrill-apimandrill-api-wrapperlaravelnotificationsmailchimpmandrillchannel

### Embed Badge

![Health badge](/badges/salamwaddah-laravel-mandrill-driver/health.svg)

```
[![Health](https://phpackages.com/badges/salamwaddah-laravel-mandrill-driver/health.svg)](https://phpackages.com/packages/salamwaddah-laravel-mandrill-driver)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M165](/packages/spatie-laravel-health)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2401.4M17](/packages/laravel-notification-channels-discord)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1235.9k20](/packages/fleetbase-core-api)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
