PHPackages                             gcolon021/mandrill-api-php-8 - 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. [API Development](/categories/api)
4. /
5. gcolon021/mandrill-api-php-8

ActiveLibrary[API Development](/categories/api)

gcolon021/mandrill-api-php-8
============================

A PHP client library for Mandrill's REST API

v1.0.2(1y ago)1456MITPHPPHP &gt;=8

Since Jan 3Pushed 1y agoCompare

[ Source](https://github.com/Gcolon021/mandrill-api-php)[ Packagist](https://packagist.org/packages/gcolon021/mandrill-api-php-8)[ RSS](/packages/gcolon021-mandrill-api-php-8/feed)WikiDiscussions master Synced 1mo ago

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

### Description

[](#description)

I am not the original creator of this code. The original repository was forked in order to update compatibility with PHP 8.

mandrill-api-php
================

[](#mandrill-api-php)

[![Build Status](https://camo.githubusercontent.com/680ff993b9697e3900c57757cd6c8d11c3d3724144ebaea02f410b02cf124f45/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6a6c696e6e2f6d616e6472696c6c2d6170692d7068702e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/jlinn/mandrill-api-php)

A PHP client library for [Mandrill's API](https://mandrillapp.com/api/docs/).

This library provides all of the functionality present in the [official PHP client](https://bitbucket.org/mailchimp/mandrill-api-php/), but makes use of namespaces and provides helper classes to ease message sending.

Installation Using [Composer](http://getcomposer.org/)
======================================================

[](#installation-using-composer)

Assuming composer.phar is located in your project's root directory, run the following command:

```
composer require gcolon021/mandrill-api-php-8
```

Usage
=====

[](#usage)

Sending a Message
-----------------

[](#sending-a-message)

```
use Jlinn\Mandrill\Mandrill;
use Jlinn\Mandrill\Struct\Message;
use Jlinn\Mandrill\Struct\Recipient;

// instantiate a client object
$mandrill = new Mandrill('your_api_key');

// instantiate a Message object
$message = new Message();

// define message properties
$message->text = 'Hello, *|NAME|*!';
$message->subject = 'Test';
$message->from_email = 'test@example.com';
$message->from_name = 'Mandrill API Test';

// instantiate a Recipient object and add details
$recipient = new Recipient();
$recipient->email = 'recipient.email@example.com';
$recipient->name = 'Recipient Name';
$recipient->addMergeVar('NAME', $recipient->name);

// add the recipient to the message
$message->addRecipient($recipient);

// send the message
$response = $mandrill->messages()->send($message);
```

Usage with Laravel 4.x
======================

[](#usage-with-laravel-4x)

We have built a factory so that it's easier to use with Laravel 4.x facades.

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

[](#configuration)

In order to publish the package configuration you need to perform the following command:

```
php artisan config:publish jlinn/mandrill-api-php

```

Change then the `secret` variable with your Mandrill secret key.

Sending a Message
-----------------

[](#sending-a-message-1)

```
// instantiate a client object
$api = Mandrill::api();

// instantiate a message object
$message = Mandrill::message([
    'text'       => 'Hello, *|NAME|*!',
    'subject'    => 'Test',
    'from_email' => 'test@example.com',
    'from_name'  => 'Mandrill API Test'
]);

// instantiate a Recipient object and add details
$recipient = Mandrill::recipient('recipient.email@example.com', 'Recipient Name');
$recipient->addMergeVar('NAME', $recipient->name);

// add the recipient to the message
$message->addRecipient($recipient);

// send the message
$response = $api->messages()->send($message);
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance42

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~14 days

Total

3

Last Release

464d ago

### Community

Maintainers

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

---

Top Contributors

[![jlinn](https://avatars.githubusercontent.com/u/4562038?v=4)](https://github.com/jlinn "jlinn (8 commits)")[![GiamPy5](https://avatars.githubusercontent.com/u/4460702?v=4)](https://github.com/GiamPy5 "GiamPy5 (7 commits)")[![Gcolon021](https://avatars.githubusercontent.com/u/34667267?v=4)](https://github.com/Gcolon021 "Gcolon021 (6 commits)")

---

Tags

mandrill

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gcolon021-mandrill-api-php-8/health.svg)

```
[![Health](https://phpackages.com/badges/gcolon021-mandrill-api-php-8/health.svg)](https://phpackages.com/packages/gcolon021-mandrill-api-php-8)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[jlinn/mandrill-api-php

A PHP client library for Mandrill's REST API

24117.4k](/packages/jlinn-mandrill-api-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)[a2design-company/mandrill-cakephp-plugin

Mandrill CakePHP plugin

193.2k](/packages/a2design-company-mandrill-cakephp-plugin)

PHPackages © 2026

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