PHPackages                             yarcode/yii2-mailgun-mailer - 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. yarcode/yii2-mailgun-mailer

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

yarcode/yii2-mailgun-mailer
===========================

Mailgun mailer implementation for Yii2

1.1.3(7y ago)1576.0k↓25%10[1 issues](https://github.com/yarcode/yii2-mailgun-mailer/issues)[3 PRs](https://github.com/yarcode/yii2-mailgun-mailer/pulls)MITPHP

Since Jul 28Pushed 6y ago1 watchersCompare

[ Source](https://github.com/yarcode/yii2-mailgun-mailer)[ Packagist](https://packagist.org/packages/yarcode/yii2-mailgun-mailer)[ Docs](http://packagist.org/packages/yarcode/yii2-mailgun-mailer)[ RSS](/packages/yarcode-yii2-mailgun-mailer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (3)Versions (6)Used By (0)

Mailgun mailer component for Yii2 framework
===========================================

[](#mailgun-mailer-component-for-yii2-framework)

[![Build Status](https://camo.githubusercontent.com/12a0e426fa428cc00ff0fdcd701177a398a78eda76354b426a4d96af3099a0c2/68747470733a2f2f7472617669732d63692e6f72672f796172636f64652f796969322d6d61696c67756e2d6d61696c65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/yarcode/yii2-mailgun-mailer)[![Latest Stable Version](https://camo.githubusercontent.com/15ee20579ec0a4f158c4065676bee47516625e5d76037b3d15d202d7ecdf717e/68747470733a2f2f706f7365722e707567782e6f72672f796172636f64652f796969322d6d61696c67756e2d6d61696c65722f762f737461626c65)](https://packagist.org/packages/yarcode/yii2-mailgun-mailer)[![Total Downloads](https://camo.githubusercontent.com/d5e66bb3b7b1abd842874efd96505752ed257e80a0d5643f3686d641875a2965/68747470733a2f2f706f7365722e707567782e6f72672f796172636f64652f796969322d6d61696c67756e2d6d61696c65722f646f776e6c6f616473)](https://packagist.org/packages/yarcode/yii2-mailgun-mailer)[![License](https://camo.githubusercontent.com/880543f19ad7ecaeabc342648f53ee6690eb0a19737526f7e8ce09c64d101f83/68747470733a2f2f706f7365722e707567782e6f72672f796172636f64652f796969322d6d61696c67756e2d6d61696c65722f6c6963656e7365)](https://packagist.org/packages/yarcode/yii2-mailgun-mailer)

Mailgun is a transactional email cloud service. Say goodbye to your usual sendmail or postfix MTA problems. You can start sending emails via cloud without writing any line of code.

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

[](#installation)

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

Either run

```
composer require --prefer-dist yarcode/yii2-mailgun-mailer

```

or add

```
"yarcode/yii2-mailgun-mailer": "*"
```

to the `require` section of your composer.json.

Usage
-----

[](#usage)

Configure `YarCode\Yii2\Mailgun\Mailer` as your mailer.

```
  'mailer' => [
      'class' => \YarCode\Yii2\Mailgun\Mailer::class,
      'domain' => 'example.org',
      'apiKey' => 'CHANGE-ME',
  ],

```

Now you can send your emails as usual.

```
$message = \Yii::$app->mailer->compose()
  ->setSubject('test subject')
  ->setFrom('test@example.org')
  ->setHtmlBody('test body')
  ->setTo('user@example.org');

\Yii::$app->mailer->send($message);

```

Licence
-------

[](#licence)

MIT

Links
-----

[](#links)

- [GitHub repository](https://github.com/yarcode/yii2-mailgun-mailer)
- [Composer package](https://packagist.org/packages/yarcode/yii2-mailgun-mailer)

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 93.8% 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 ~173 days

Total

5

Last Release

2889d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1297270?v=4)[Vahid G](/maintainers/lagman)[@lagman](https://github.com/lagman)

---

Top Contributors

[![metalagman](https://avatars.githubusercontent.com/u/1983796?v=4)](https://github.com/metalagman "metalagman (15 commits)")[![Konfuze](https://avatars.githubusercontent.com/u/131331?v=4)](https://github.com/Konfuze "Konfuze (1 commits)")

---

Tags

apimailemailmaileryii2mailgun

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/yarcode-yii2-mailgun-mailer/health.svg)

```
[![Health](https://phpackages.com/badges/yarcode-yii2-mailgun-mailer/health.svg)](https://phpackages.com/packages/yarcode-yii2-mailgun-mailer)
```

###  Alternatives

[boundstate/yii2-mailgun

Mailgun integration for the Yii framework

28160.6k](/packages/boundstate-yii2-mailgun)[baibaratsky/php-mailgun

Mailgun API PHP library and Yii extension (as well as Yii2)

3224.6k](/packages/baibaratsky-php-mailgun)

PHPackages © 2026

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