PHPackages                             awsm3/mailgun-zend3 - 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. awsm3/mailgun-zend3

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

awsm3/mailgun-zend3
===================

A PHP client library for Mailgun's REST API for Zend Framework 3

0.1.0(7y ago)0107MITPHPPHP &gt;=7.0

Since Jun 6Pushed 7y agoCompare

[ Source](https://github.com/AWSM3/mailgun-zend3)[ Packagist](https://packagist.org/packages/awsm3/mailgun-zend3)[ RSS](/packages/awsm3-mailgun-zend3/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (5)Versions (2)Used By (0)

Mailgun API for Zend Framework 3
================================

[](#mailgun-api-for-zend-framework-3)

A PHP ZF3 client library for [Mailgun's API](https://documentation.mailgun.com/en/latest/).

This library provides all of the functionality present in the [official PHP client](https://github.com/mailgun/mailgun-php), but makes use of namespaces, provides helper classes to ease message sending and works with Zend Framework 3 (uses its 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:

```
composer require awsm3/mailgun-zend3
```

Usage
=====

[](#usage)

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

[](#sending-a-message)

```
/** @uses */
use ZendMailgun\{
    Mailgun,
    Struct\Message,
    Struct\Sender,
    Struct\Recipient,
    Struct\RecipientsList
}

// Instantiate a client object
$transport = new Mailgun('your_api_key');

// Instantiate a sender
$sender = new Sender('test@example.com', 'Your name');

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

// Define message properties
$message->setText('Hello, username');
$message->setSubject('Test');
$message->setFrom($sender->prepare());

// Instantiate a Recipient object and add details
$recipient = new Recipient();
$recipient->setEmail('recipient.email@example.com');
$recipient->setName('Recipient Name');

// Add the recipient to the message
$message->setTo($recipient->prepare());

// Or make recipients list
$recipientsList = new RecipientsList(
    new Recipient('recipient-1@mail.com', 'Recipient 1'),
    new Recipient('recipient-2@mail.com', 'Recipient 2'),
);
$message->setTo($recipientsList->prepare());

// Send the message
$response = $transport->messages()->send('your-domain', $message);
```

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

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

```
/** @uses */
use ZendMailgun\{
    Mailgun,
    Struct\Message,
    Struct\Sender,
    Struct\Recipient,
    Struct\RecipientsList
}

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

// Instantiate a client object
$transport = new Mailgun('your_api_key');

// send the message
$response = $transport->messages()->send('your-domain', $message);
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

2897d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2bb7ace9366fe581e96f8df07853bbf8026a669a98e75d5baf8eea86f7c6fb68?d=identicon)[AWSM3](/maintainers/AWSM3)

---

Top Contributors

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

---

Tags

mailgunZend Frameworkzf3Zend Framework 3

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/awsm3-mailgun-zend3/health.svg)

```
[![Health](https://phpackages.com/badges/awsm3-mailgun-zend3/health.svg)](https://phpackages.com/packages/awsm3-mailgun-zend3)
```

###  Alternatives

[cspoo/swiftmailer-mailgun-bundle

Swiftmailer Mailgun bundle

1031.1M](/packages/cspoo-swiftmailer-mailgun-bundle)[boundstate/yii2-mailgun

Mailgun integration for the Yii framework

28160.6k](/packages/boundstate-yii2-mailgun)[davidhavl/dherrorlogging

Full featured error logging module for ZF2/ZF3 application

1924.5k](/packages/davidhavl-dherrorlogging)[yarcode/yii2-mailgun-mailer

Mailgun mailer implementation for Yii2

1576.0k](/packages/yarcode-yii2-mailgun-mailer)

PHPackages © 2026

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