PHPackages                             bluebaytravel/mandrill - 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. bluebaytravel/mandrill

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

bluebaytravel/mandrill
======================

Laravel 5 Mandrill API Wrapper

v1.2.0(9y ago)118341MITPHPPHP &gt;=5.5.9

Since Nov 30Pushed 8y ago2 watchersCompare

[ Source](https://github.com/BlueBayTravel/Mandrill)[ Packagist](https://packagist.org/packages/bluebaytravel/mandrill)[ RSS](/packages/bluebaytravel-mandrill/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (7)Versions (4)Used By (0)

Laravel Mandrill
================

[](#laravel-mandrill)

Laravel 5 wrapper for the [Mandrill](https://mandrillapp.com/api/docs/) API with multiple connections.

[![Build Status](https://camo.githubusercontent.com/9757766cb177e2e4f3de5b0d5d64e185b59e74d3572b580df9276a4b6b6dc785/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f426c756542617954726176656c2f4d616e6472696c6c2e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/BlueBayTravel/Mandrill)[![StyleCI](https://camo.githubusercontent.com/eb978ed1f1ad1711ad259157e866d417298a78def5d0fdc387617a0b3ae04666/68747470733a2f2f7374796c6563692e696f2f7265706f732f34373132303036342f736869656c643f7374796c653d666c6174)](https://styleci.io/repos/47120064)

```
// Return the users on the Mandrill account.
Mandrill::users()

// Dependency injection example.
$mandrillManager->users()
```

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

[](#installation)

Require this package, with [Composer](https://getcomposer.org/), in the root directory of your project.

```
composer require bluebaytravel/mandrill
```

Add the service provider to `config/app.php` in the `providers` array.

```
BlueBayTravel\Mandrill\MandrillServiceProvider::class
```

If you want you can use the [facade](http://laravel.com/docs/facades). Add the reference in `config/app.php` to your aliases array.

```
'Mandrill' => BlueBayTravel\Mandrill\Facades\Mandrill::class
```

Configuration
-------------

[](#configuration)

Laravel Mandrill requires connection configuration. To get started, you'll need to publish all vendor assets:

```
php artisan vendor:publish
```

This will create a `config/mandrill.php` file in your app that you can modify to set your configuration. Also, make sure you check for changes to the original config file in this package between releases.

#### Default Connection Name

[](#default-connection-name)

This option `default` is where you may specify which of the connections below you wish to use as your default connection for all work. Of course, you may use many connections at once using the manager class. The default value for this setting is `main`.

#### Mandrill Connections

[](#mandrill-connections)

This option `connections` is where each of the connections are setup for your application. Example configuration has been included, but you may add as many connections as you would like.

Usage
-----

[](#usage)

### Mandrill

[](#mandrill)

The Mandrill class is a wrapper around `mandrill\mandrill` package.

#### MandrillManager

[](#mandrillmanager)

This is the class of most interest. It is bound to the ioc container as `mandrill` and can be accessed using the `Facades\Mandrill` facade. This class implements the ManagerInterface by extending AbstractManager. The interface and abstract class are both part of [Graham Campbell's](https://github.com/GrahamCampbell) [Laravel Manager](https://github.com/GrahamCampbell/Laravel-Manager) package, so you may want to go and checkout the docs for how to use the manager class over at that repository. Note that the connection class returned will always be an instance of `BlueBayTravel\Mandrill\Mandrill`.

#### Facades\\Mandrill

[](#facadesmandrill)

This facade will dynamically pass static method calls to the `mandrill` object in the ioc container which by default is the `MandrillManager` class.

#### MandrillServiceProvider

[](#mandrillserviceprovider)

This class contains no public methods of interest. This class should be added to the providers array in `config/app.php`. This class will setup ioc bindings.

### Examples

[](#examples)

Here you can see an example of just how simple this package is to use. Out of the box, the default adapter is `main`. After you enter your authentication details in the config file, it will just work:

```
// You can alias this in config/app.php.
use BlueBayTravel\Mandrill\Facades\Mandrill;

Mandrill::users();
```

The Mandrill manager will behave like it is a `BlueBayTravel\Mandrill\Mandrill`. If you want to call specific connections, you can do that with the connection method:

```
use BlueBayTravel\Mandrill\Facades\Mandrill;

// Writing this…
Mandrill::connection('main')->users();

// ...is identical to writing this
Mandrill::users();

// and is also identical to writing this.
Mandrill::connection()->users();

// This is because the main connection is configured to be the default.
Mandrill::getDefaultConnection(); // This will return main.

// We can change the default connection.
Mandrill::setDefaultConnection('alternative'); // The default is now alternative.
```

If you prefer to use dependency injection over facades like me, then you can inject the manager:

```
use BlueBayTravel\Mandrill\MandrillManager;

class Foo
{
    protected $mandrill;

    public function __construct(MandrillManager $mandrill)
    {
        $this->mandrill = $mandrill;
    }

    public function bar($id)
    {
        $this->mandrill->users();
    }
}

App::make('Foo')->bar();
```

License
-------

[](#license)

Laravel Mandrill is licensed under [The MIT License (MIT)](LICENSE).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 90% 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 ~241 days

Total

3

Last Release

3331d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9e4934b15ff7d8cffabece955994bed29b31429f4c2e8f13fa0868c753bb1c30?d=identicon)[jbrooksuk](/maintainers/jbrooksuk)

---

Top Contributors

[![jbrooksuk](https://avatars.githubusercontent.com/u/246103?v=4)](https://github.com/jbrooksuk "jbrooksuk (9 commits)")[![vinkla](https://avatars.githubusercontent.com/u/499192?v=4)](https://github.com/vinkla "vinkla (1 commits)")

---

Tags

laravelmandrill

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bluebaytravel-mandrill/health.svg)

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

###  Alternatives

[laravel-notification-channels/telegram

Telegram Notifications Channel for Laravel

1.1k3.4M35](/packages/laravel-notification-channels-telegram)[mckenziearts/laravel-notify

Flexible flash notifications for Laravel

1.7k1.1M5](/packages/mckenziearts-laravel-notify)[propaganistas/laravel-disposable-email

Disposable email validator

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

Mandrill Driver for Laravel

773.5M](/packages/therobfonz-laravel-mandrill-driver)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[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)

PHPackages © 2026

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