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

ActiveLibrary[API Development](/categories/api)

freax/mandrill-zend2
====================

A PHP client library for Mandrill's REST API for Zend Framework 2 (&gt;=2.5)

2.1(10y ago)03.7k↓93.3%1MITPHPPHP &gt;=5.5

Since Oct 26Pushed 10y ago1 watchersCompare

[ Source](https://github.com/freax/mandrill-zend2)[ Packagist](https://packagist.org/packages/freax/mandrill-zend2)[ RSS](/packages/freax-mandrill-zend2/feed)WikiDiscussions master Synced today

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

Mandrill API for Zend Framework 2 (&gt;=2.5)
============================================

[](#mandrill-api-for-zend-framework-2-25)

A PHP ZF2 (&gt;=2.5) 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, provides helper classes to ease message sending and works with Zend Framework 2 (&gt;=2.5) (uses its library).

This library based on Joe Linn's library ().

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

[](#installation-using-composer)

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

```
php composer.phar require freax/mandrill-zend2:2.*
```

Usage
=====

[](#usage)

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

[](#sending-a-message)

```
use Mandrill\Mandrill;
use Mandrill\Struct\Message;
use 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);
```

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

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

```
use Mandrill\Mandrill;
use Mandrill\Struct\Message;

// convert from ZF message
// $zfMessage is instance of \Zend\Mail\Message
$message = Message::convertZFMail($zfMessage);

// add any field you want
$message->metadata = ...;

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

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

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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

Total

2

Last Release

3902d ago

### Community

Maintainers

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

---

Tags

zf2mandrill

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[zfr/zfr-prerender

Integration with prerender.io service

218.3k](/packages/zfr-zfr-prerender)[evandotpro/edp-github

Github API integration module for Zend Framework 2

242.3k](/packages/evandotpro-edp-github)

PHPackages © 2026

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