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

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

dmitxe/yii2-mailgun
===================

Mailgun integration for the Yii framework

031PHPCI failing

Since Jun 25Pushed 5y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Mailgun
=======

[](#mailgun)

Mailgun integration for the Yii framework. This is fork [boundstate/yii2-mailgun](https://github.com/boundstate/yii2-mailgun)

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

[](#installation)

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

Either run

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

```

or add

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

```

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

Usage
-----

[](#usage)

Configure it in the application configuration:

```
'components' => [
    ...
    'mailer' => [
        'class' => 'dmitxe\mailgun\Mailer',
        'key' => 'key-example',
        'domain' => 'mg.example.com',
        'endpoint' => 'https://api.mailgun.net',
    ],
    ...
],
```

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

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/272559abd1f8d6f6e7084cc64e422cec0943a7f0b9e0b325c9caebd03e8a4730?d=identicon)[dmitxe](/maintainers/dmitxe)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[tijsverkoyen/css-to-inline-styles

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.

5.8k505.3M227](/packages/tijsverkoyen-css-to-inline-styles)[minishlink/web-push

Web Push library for PHP

1.9k12.0M53](/packages/minishlink-web-push)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[spatie/url-signer

Generate a url with an expiration date and signature to prevent unauthorized access

4422.3M16](/packages/spatie-url-signer)[mattketmo/email-checker

Throwaway email detection library

2742.0M5](/packages/mattketmo-email-checker)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)

PHPackages © 2026

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