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

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

robertklein/yii2-mailgun
========================

Mailgun integration with response for the Yii framework

v0.0.4(7y ago)010Apache-2.0PHP

Since May 12Pushed 7y ago1 watchersCompare

[ Source](https://github.com/robertklein/yii2-mailgun)[ Packagist](https://packagist.org/packages/robertklein/yii2-mailgun)[ RSS](/packages/robertklein-yii2-mailgun/feed)WikiDiscussions master Synced today

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

Mailgun
=======

[](#mailgun)

Mailgun integration with response for the Yii framework

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist robertklein/yii2-mailgun "*"

```

or add

```
"robertklein/yii2-mailgun": "*"

```

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

Usage
-----

[](#usage)

Configure it in the application configuration:

```
'components' => [
    ...
    'mailer' => [
        'class' => 'robertklein\mailgun\Mailer',
        'key' => 'key-example',
        'domain' => 'mg.example.com',
    ],
    ...
],
```

To send an email, you may use the following code:

```
Yii::$app->mailer->compose('contact/html', ['contactForm' => $form])
    ->setFrom('from@domain.com')
    ->setTo($form->email)
    ->setSubject($form->subject)
    ->send();
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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 ~481 days

Total

4

Last Release

2574d ago

### Community

Maintainers

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

---

Top Contributors

[![mikejpeters](https://avatars.githubusercontent.com/u/3334654?v=4)](https://github.com/mikejpeters "mikejpeters (5 commits)")[![robertklein](https://avatars.githubusercontent.com/u/8589235?v=4)](https://github.com/robertklein "robertklein (3 commits)")[![gattir](https://avatars.githubusercontent.com/u/9007655?v=4)](https://github.com/gattir "gattir (1 commits)")[![OllieDay](https://avatars.githubusercontent.com/u/9725880?v=4)](https://github.com/OllieDay "OllieDay (1 commits)")

---

Tags

mailemailmaileryii2extensionmailgunrackspace

### Embed Badge

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

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

###  Alternatives

[boundstate/yii2-mailgun

Mailgun integration for the Yii framework

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

Mailgun mailer implementation for Yii2

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

A library provides Yii2 integration with SparkPost mail service

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

Yii2 mail queue component for yii2-swiftmailer.

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

PHPackages © 2026

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