PHPackages                             mixislv/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. mixislv/laravel-mandrill-driver

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

mixislv/laravel-mandrill-driver
===============================

Laravel 9+ Mandrill Driver &amp; Webhooks handler

v2.1.0(3y ago)08.8kMITPHPPHP ^8.0

Since Sep 26Pushed 3y ago1 watchersCompare

[ Source](https://github.com/mixisLv/laravel-mandrill-driver)[ Packagist](https://packagist.org/packages/mixislv/laravel-mandrill-driver)[ Docs](https://github.com/mixisLv/laravel-mandrill-driver)[ RSS](/packages/mixislv-laravel-mandrill-driver/feed)WikiDiscussions master Synced today

READMEChangelog (8)Dependencies (4)Versions (10)Used By (0)

Laravel 9+ Mandrill Driver &amp; Webhooks handler
=================================================

[](#laravel-9-mandrill-driver--webhooks-handler)

This package re-enables Mandrill driver functionality using the Mail facade in Laravel 9+.

Install
-------

[](#install)

To install the package in your project, you need to require the package via composer:

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

Configure
---------

[](#configure)

To use the Mandrill driver, set the `MAIL_MAILER` environment variable to "mandrill". Next, update the `config/services.php` configuration file to include the following options:

```
'mandrill' => [
    'secret' => env('MANDRILL_SECRET'),
    'webhook-key' => env('MANDRILL_WEBHOOK_KEY'),
],
```

Usage
-----

[](#usage)

### Send e-mail

[](#send-e-mail)

You can also add custom Mandrill headers to each email sent.

```
// @todo

use Symfony\Component\Mime\Email;

/**
 * Build the message.
 *
 * @return $this
 */
public function build()
{
    $this->view('emails.example');

    $this->withSymfonyMessage(function (Email $message) {
        $message->getHeaders()->addTextHeader(
            'Custom-Mailchimp-Header', 'Header Value' // @see https://mailchimp.com/developer/transactional/docs/smtp-integration/#customize-messages-with-smtp-headers

        );
    });

    return $this;
}
```

### Listening response

[](#listening-response)

```
// @todo
```

### Webhooks

[](#webhooks)

Forked from [eventhomes/laravel-mandrillhooks](https://github.com/eventhomes/laravel-mandrillhooks)

1. Create a controller that extends MandrillWebhookController as follows. You can then handle any Mandrillapp webhook event.

```
use mixisLv\LaravelMandrillDriver\MandrillWebhookController;

class MandrillController extends MandrillWebhookController {

    /**
     * Handle a hard bounced email
     *
     * @param $payload
     */
    public function handleHardBounce($payload)
    {
        $email = $payload['msg']['email'];
    }

    /**
     * Handle a rejected email
     *
     * @param $payload
     */
    public function handleReject($payload)
    {
        $email = $payload['msg']['email'];
    }
}
```

2. Create the route to handle the webhook. In your routes.php file add the following.

```
Route::post('mandrill-webhook', ['as' => 'mandrill.webhook', 'uses' => 'MandrillController@handleWebHook']);
```

3. [Exclude your route from CSRF protection](https://laravel.com/docs/5.4/csrf#csrf-excluding-uris) so it will not fail.
4. Make sure you add your webhook in Mandrill to point to your route. You can do this here:

#### Webhook Events

[](#webhook-events)

[Webhook event types](https://mandrill.zendesk.com/hc/en-us/articles/205583217-Introduction-to-Webhooks#event-types):

Event typeMethodDescriptionSenthandleSend()message has been sent successfullyBouncedhandleHardBounce()message has hard bouncedOpenedhadleOpen()recipient opened a message; will only occur when open tracking is enabledMarked As SpamhandleSpam()recipient marked a message as spamRejectedhandleReject()message was rejectedDelayedhandleDeferral()message has been sent, but the receiving server has indicated mail is being delivered too quickly and Mandrill should slow down sending temporarilySoft-BouncedhandleSoftBounce()message has soft bouncedClickedhandleClick()recipient clicked a link in a message; will only occur when click tracking is enabledRecipient UnsubscribeshandleUnsub()recipient unsubscribesRejection Blacklist ChangeshandleBlacklist()triggered when a Rejection Blacklist entry is added, changed, or removedRejection Whitelist ChangeshandleWhitelist()triggered when a Rejection Whitelist entry is added or removedChangelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information about recent changes.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~146 days

Recently: every ~34 days

Total

9

Last Release

1252d ago

Major Versions

v1.4.0 → v2.0.02022-09-19

PHP version history (3 changes)v1.0.0PHP ^7.2

v1.2.0PHP ^7.2|^8.0

v2.0.0PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3735128?v=4)[Mikus Rozenbergs](/maintainers/mixisLv)[@mixisLv](https://github.com/mixisLv)

---

Top Contributors

[![mixisLv](https://avatars.githubusercontent.com/u/3735128?v=4)](https://github.com/mixisLv "mixisLv (14 commits)")

---

Tags

laravelmaildriverwebhooksmandrill

### Embed Badge

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

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

###  Alternatives

[eventhomes/laravel-mandrillhooks

A simple Mandrill webhook controller to help with events. Compatible with Laravel 5+ and Lumen 5+.

6375.3k](/packages/eventhomes-laravel-mandrillhooks)[propaganistas/laravel-disposable-email

Disposable email validator

5762.6M6](/packages/propaganistas-laravel-disposable-email)[intonate/laravel-mandrill-driver

Laravel Mandrill API based mail driver.

171.1M](/packages/intonate-laravel-mandrill-driver)[laravel-notification-channels/discord

Laravel notification driver for Discord.

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

Mandrill Driver for Laravel

773.5M](/packages/therobfonz-laravel-mandrill-driver)[sunaoka/laravel-ses-template-driver

Amazon SES template mail driver for Laravel.

1088.0k](/packages/sunaoka-laravel-ses-template-driver)

PHPackages © 2026

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