PHPackages                             eseperio/yii2-email-accounts-manager - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. eseperio/yii2-email-accounts-manager

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

eseperio/yii2-email-accounts-manager
====================================

Use and manage multiple email accounts in a single yii2-project

1.0.6(1mo ago)1529↓33.3%MITPHP

Since Feb 1Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/Eseperio/yii2-email-accounts-manager)[ Packagist](https://packagist.org/packages/eseperio/yii2-email-accounts-manager)[ RSS](/packages/eseperio-yii2-email-accounts-manager/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (2)Versions (8)Used By (0)

yii2-email-accounts-manager
===========================

[](#yii2-email-accounts-manager)

Use and manage different email accounts under the same project. Features methods to live test the configuration and ensure it is correct.

### Features

[](#features)

- Manage multiple email accounts
- SMTP + IMAP configuration
- SMTP + IMAP live test
- Autodiscover SMTP and IMAP settings (when available)

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

[](#installation)

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

`composer require eseperio/yii2-email-accounts-manager`

`ext-simplexml` is required for autodiscover feature, but has not been required within composer.json so you can use the library without autodiscover

Add the migration path to your console config:

```
return [
    'controllerMap' => [
        'migrate' => [
            'class' => 'yii\console\controllers\MigrateController',
            'migrationPath' => [
                '@vendor/eseperio/yii2-email-accounts-manager/src/migrations',
            ],
        ],
    ],
];
```

Add the module to your app modules configuration

```
return [
    'modules' => [
        'email-manager' =>[
            'class'=> \eseperio\emailManager\EmailManagerModule::class,
            'showImapSettings' => false, // change if you need imap settings to be shown,
            // 'mailer'=> 'mailer',
            // 'transport => ['class' => 'Swift_SmtpTransport'],
        ],

    ]
]
```

Usage
-----

[](#usage)

```
Important: This module will replace the current transport for the mailer defined and it does not restore to previous value.
If you want to prevent this use a different mailer component for this module.

```

This module includes methods for checking whether the email account is valid and for sending emails using the given configuration.

The EmailAccount model includes useful methods, like `getTransport()` and `setAsMainTransport()`.

`getTransport()` returns the transport configuration based on configuration defined within module and the account itself.

`setAsMainTransport()` will set the transport configuration for the mailer component defined in the module configuration and will return the mailer instance. `compose($view='',$params=[])` will return a new message instance preconfigured with the transport configuration for the account and also `setFrom` defined with the account address.

### Sending an email from a custom account

[](#sending-an-email-from-a-custom-account)

```
use eseperio\emailmanager\models\EmailAccount;

$account = EmailAccount::findOne(1)->compose('test', ['message' => 'Hello world!'])->setTo('someaddress@example.com')->send();
```

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance90

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

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

Recently: every ~286 days

Total

7

Last Release

51d ago

### Community

Maintainers

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

---

Top Contributors

[![Eseperio](https://avatars.githubusercontent.com/u/5459366?v=4)](https://github.com/Eseperio "Eseperio (17 commits)")

### Embed Badge

![Health badge](/badges/eseperio-yii2-email-accounts-manager/health.svg)

```
[![Health](https://phpackages.com/badges/eseperio-yii2-email-accounts-manager/health.svg)](https://phpackages.com/packages/eseperio-yii2-email-accounts-manager)
```

###  Alternatives

[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)

PHPackages © 2026

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