PHPackages                             shehrojkhan786/laravel-mandrill-notifications-channel - 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. shehrojkhan786/laravel-mandrill-notifications-channel

ActiveLibrary

shehrojkhan786/laravel-mandrill-notifications-channel
=====================================================

Mandrill notification channel for Laravel 8

1.1.2(5y ago)07MITPHPPHP &gt;=7.0.0

Since Jul 23Pushed 5y agoCompare

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

READMEChangelogDependencies (4)Versions (15)Used By (0)

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

[](#installation)

```
composer require Shehrojkhan786/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

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 86.7% 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 ~31 days

Recently: every ~91 days

Total

13

Last Release

2116d ago

Major Versions

0.0.7 → 1.02019-07-26

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/28523535?v=4)[shehrojkhan786](/maintainers/shehrojkhan786)[@shehrojkhan786](https://github.com/shehrojkhan786)

---

Top Contributors

[![salamwaddah](https://avatars.githubusercontent.com/u/26627088?v=4)](https://github.com/salamwaddah "salamwaddah (26 commits)")[![developernaren](https://avatars.githubusercontent.com/u/3628468?v=4)](https://github.com/developernaren "developernaren (2 commits)")[![shehrojkhan786](https://avatars.githubusercontent.com/u/28523535?v=4)](https://github.com/shehrojkhan786 "shehrojkhan786 (2 commits)")

---

Tags

laravellaravel 6laravel 7notificationsdriverlaravel 5mailchimpmandrillchannel

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/shehrojkhan786-laravel-mandrill-notifications-channel/health.svg)

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

###  Alternatives

[laravel/slack-notification-channel

Slack Notification Channel for laravel.

89069.7M111](/packages/laravel-slack-notification-channel)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)[salamwaddah/laravel-mandrill-driver

Mandrill notification channel for Laravel 5, 6, 7, 8, 9, 10, 11, 12

1174.3k](/packages/salamwaddah-laravel-mandrill-driver)[victorybiz/geoip-location

Get the geographical location of website visitors based on their IP addresses. Support Laravel and PHP (Non-Laravel) Project.

22157.9k2](/packages/victorybiz-geoip-location)[mostafaznv/recaptcha

Laravel package for Google Recaptcha v3

2127.5k](/packages/mostafaznv-recaptcha)[itsmurumba/laravel-mpesa

Laravel Package for Mpesa Daraja API

191.6k](/packages/itsmurumba-laravel-mpesa)

PHPackages © 2026

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