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

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

wdmg/yii2-mailer
================

Mail manager

1.4.0(2y ago)451521MITPHP

Since Aug 2Pushed 2y ago3 watchersCompare

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

READMEChangelog (2)Dependencies (4)Versions (19)Used By (1)

[![Yii2](https://camo.githubusercontent.com/8f989c4232d99c88827cc336af846359f9c7ed51b0efffd5dd20ac8bd0b1781d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f72657175697265642d596969325f76322e302e33352d626c75652e737667)](https://packagist.org/packages/yiisoft/yii2)[![Downloads](https://camo.githubusercontent.com/8483b58bb2c18ba31ac545cd55910dc73b5a2556baf783d80f9bb8b4d9bdb094/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f77646d672f796969322d6d61696c65722e737667)](https://packagist.org/packages/wdmg/yii2-mailer)[![Packagist Version](https://camo.githubusercontent.com/cd1152058000bdf89eee3c31e0fa72c857ee6029f7f6e8fd55c60cd0260d6a9e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77646d672f796969322d6d61696c65722e737667)](https://packagist.org/packages/wdmg/yii2-mailer)[![Progress](https://camo.githubusercontent.com/d2c102b075c16f8a841e697b04c43bc93c8d092c5795ad8b3090d7fa993c258a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70726f67726573732d72656164795f746f5f7573652d677265656e2e737667)](https://camo.githubusercontent.com/d2c102b075c16f8a841e697b04c43bc93c8d092c5795ad8b3090d7fa993c258a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70726f67726573732d72656164795f746f5f7573652d677265656e2e737667)[![GitHub license](https://camo.githubusercontent.com/ddc5aabd08f0b76bfe6a79d630f8e7e506c2f9554eb365cc8adc4e56f439bd14/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f77646d672f796969322d6d61696c65722e737667)](https://github.com/wdmg/yii2-mailer/blob/master/LICENSE)

[![Yii2 Mailer](./docs/images/yii2-mailer.png)](./docs/images/yii2-mailer.png)

Yii2 Mailer
===========

[](#yii2-mailer)

Mail manager and viewer for Yii2.

This module is an integral part of the [Butterfly.СMS](https://butterflycms.com/) content management system, but can also be used as an standalone extension.

Copyrights (c) 2019-2023 [W.D.M.Group, Ukraine](https://wdmg.com.ua/)

Requirements
============

[](#requirements)

- PHP 5.6 or higher
- Yii2 v.2.0.35 and newest
- [Yii2 Base](https://github.com/wdmg/yii2-base) module (required)
- [PHP MailMimeParser](https://github.com/zbateson/mail-mime-parser) module (required)

Installation
============

[](#installation)

To install the module, run the following command in the console:

`$ composer require "wdmg/yii2-mailer"`

After configure db connection, run the following command in the console:

`$ php yii mailer/init`

And select the operation you want to perform:

1. Apply all module migrations
2. Revert all module migrations
3. Clear mails cache

Migrations
==========

[](#migrations)

In any case, you can execute the migration and create the initial data, run the following command in the console:

`$ php yii migrate --migrationPath=@vendor/wdmg/yii2-mailer/migrations`

Configure
=========

[](#configure)

To add a module to the project, add the following data in your configuration file:

```
'modules' => [
    ...
    'mailer' => [
        'class' => 'wdmg\mailer\Module',
        'routePrefix' => 'admin'
        'saveMails' => true, // if need save mail after send
        'mailsPath' => '@runtime/mail', // path to save mails
        'trackMails' => true, // if need tracking mail after send
        'trackingRoute' => '/mail', // route to tracking mails
        'saveWebMails' => false, // flag if need save web version of mail`s
        'webRoute' => '/mails', // route to web mails
        'webMailsPath' => '@webroot/mails', // path to save web version of sending mail
        'sendingInterval' => 1, // message sending interval in sec.
        'useTransport' => false, // flag for use transport configuration
        'transport' => [ // default transport configuration
            'class' => 'Swift_SmtpTransport',
            'host' => 'localhost',
            'username' => '',
            'password' => '',
            'port' => '25'
        ],
        'useEncryption' => false, // flag for use encryption in transport
        'encryption' => 'ssl', // default encryption configuration
        'useStreamOptions' => false, // flag for use stream options in transport
        'streamOptions' => [ // default stream options
            'ssl' => [
                'allow_self_signed' => false,
                'verify_peer' => false,
                'verify_peer_name' => false
            ]
        ],
        'viewPath' => '@app/mail', // views of mail`s messages
        'enableLog' => true // flag for debug
    ],
    ...
],

```

Usage
=====

[](#usage)

See the [USECASES.md](https://github.com/wdmg/yii2-mailer/blob/master/USECASES.md) for more details.

Routing
=======

[](#routing)

Use the `Module::dashboardNavItems()` method of the module to generate a navigation items list for NavBar, like this:

```

```

Status and version \[ready to use\]
===================================

[](#status-and-version-ready-to-use)

- v.1.4.0 - Update copyrights, fix nav menu
- v.1.3.6 - Update README.md and dependencies, clear mails cache from console
- v.1.3.5 - Update README.md and dependencies

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity67

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

Recently: every ~322 days

Total

18

Last Release

1048d ago

Major Versions

0.0.1 → 1.0.02019-08-02

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1635637?v=4)[Alexsander Vyshnyvetskyy](/maintainers/alex-wdmg)[@alex-wdmg](https://github.com/alex-wdmg)

---

Top Contributors

[![alex-wdmg](https://avatars.githubusercontent.com/u/1635637?v=4)](https://github.com/alex-wdmg "alex-wdmg (33 commits)")

---

Tags

mailyii2Viewerwdmgyii2 mailer

### Embed Badge

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

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

###  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)[rmrevin/yii2-postman

Mail module for Yii2.

2612.3k](/packages/rmrevin-yii2-postman)[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)
