PHPackages                             bsadnu/yii2-mailgunmailer - 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. bsadnu/yii2-mailgunmailer

ActiveYii2-extension[Mail &amp; Notifications](/categories/mail)

bsadnu/yii2-mailgunmailer
=========================

The MailGun integration for the Yii 2 framework

v1.1.0(9y ago)0230BSD-2-ClausePHP

Since Jul 12Pushed 8y ago1 watchersCompare

[ Source](https://github.com/bsadnu/yii2-mailgunmailer)[ Packagist](https://packagist.org/packages/bsadnu/yii2-mailgunmailer)[ RSS](/packages/bsadnu-yii2-mailgunmailer/feed)WikiDiscussions master Synced 3w ago

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

MailGun Extension for Yii 2
===========================

[](#mailgun-extension-for-yii-2)

[![Latest Stable Version](https://camo.githubusercontent.com/85888000702d904debb6d67a51cc24ad0ee66b68e051d85bb8c6bf7ddf746aa8/68747470733a2f2f706f7365722e707567782e6f72672f627361646e752f796969322d6d61696c67756e6d61696c65722f762f737461626c65)](https://packagist.org/packages/bsadnu/yii2-mailgunmailer) [![Total Downloads](https://camo.githubusercontent.com/d73158bfa1c2fa6f2faabc78904efb0ce41a173ea26d5003266724a8469af19f/68747470733a2f2f706f7365722e707567782e6f72672f627361646e752f796969322d6d61696c67756e6d61696c65722f646f776e6c6f616473)](https://packagist.org/packages/bsadnu/yii2-mailgunmailer) [![Latest Unstable Version](https://camo.githubusercontent.com/b310b5354ae46f76147de10f28eee6d600ecc2c9e175f28f2dd1fe8b1fd83517/68747470733a2f2f706f7365722e707567782e6f72672f627361646e752f796969322d6d61696c67756e6d61696c65722f762f756e737461626c65)](https://packagist.org/packages/bsadnu/yii2-mailgunmailer) [![License](https://camo.githubusercontent.com/116f0c5555a3e3a614986ebae36939375ba2e1df583633b7fff63a4c508a07f9/68747470733a2f2f706f7365722e707567782e6f72672f627361646e752f796969322d6d61696c67756e6d61696c65722f6c6963656e7365)](https://packagist.org/packages/bsadnu/yii2-mailgunmailer)

This extension provides a [MailGun](http://www.mailgun.com/) mail solution for [Yii framework 2.0](http://www.yiiframework.com).

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist bsadnu/yii2-mailgunmailer "*"

```

or add

```
"bsadnu/yii2-mailgunmailer": "*"
```

to the require section of your composer.json.

Usage
-----

[](#usage)

To use this extension, simply add the following code in your application configuration:

```
'components' => [
    ...
    'mailer' => [
        'class' => 'bsadnu\mailgunmailer\Mailer',
        'key' => 'MailGun API Key',
        'domain' => 'domain.name',
    ],
    ...
],
```

You can then send an email as follows:

```
Yii::$app
    ->mailer
    ->compose(
        ['html' => 'someTemplate-html', 'text' => 'someTemplate-text'],
        ['someVariable' => $someVariable]
    )
    ->setFrom('from@example.com')
    ->setTo('to@example.com')
    ->setSubject('Some subject')
    ->send();
```

License
-------

[](#license)

**yii2-mailgunmailer** is released under the BSD 2-Clause License. See the bundled [LICENSE](https://github.com/bsadnu/yii2-mailgunmailer/blob/master/LICENSE) for details.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

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

Total

2

Last Release

3348d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15787281?v=4)[Stas Bannikov](/maintainers/bsadnu)[@bsadnu](https://github.com/bsadnu)

---

Top Contributors

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

---

Tags

mailmailermailgunmailgun-extensionmailemailmaileryii2extensionmailgunmailgunmailer

### Embed Badge

![Health badge](/badges/bsadnu-yii2-mailgunmailer/health.svg)

```
[![Health](https://phpackages.com/badges/bsadnu-yii2-mailgunmailer/health.svg)](https://phpackages.com/packages/bsadnu-yii2-mailgunmailer)
```

###  Alternatives

[boundstate/yii2-mailgun

Mailgun integration for the Yii framework

28165.8k](/packages/boundstate-yii2-mailgun)[yarcode/yii2-mailgun-mailer

Mailgun mailer implementation for Yii2

1576.5k](/packages/yarcode-yii2-mailgun-mailer)[djagya/yii2-sparkpost

A library provides Yii2 integration with SparkPost mail service

1816.4k](/packages/djagya-yii2-sparkpost)[tigrov/yii2-mailqueue

Yii2 mail queue component for yii2-swiftmailer.

196.4k](/packages/tigrov-yii2-mailqueue)

PHPackages © 2026

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