PHPackages                             aselsan/codeigniter4-multi-smtp-config - 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. aselsan/codeigniter4-multi-smtp-config

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

aselsan/codeigniter4-multi-smtp-config
======================================

CodeIgniter Multiple SMTP Configuration

v1.1.1(1y ago)167MITPHPPHP ^8.0

Since Aug 31Pushed 1y ago1 watchersCompare

[ Source](https://github.com/warcooft/codeigniter4-multi-smtp-config)[ Packagist](https://packagist.org/packages/aselsan/codeigniter4-multi-smtp-config)[ RSS](/packages/aselsan-codeigniter4-multi-smtp-config/feed)WikiDiscussions develop Synced 3w ago

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

CodeIgniter Multiple SMTP Configuration
=======================================

[](#codeigniter-multiple-smtp-configuration)

A lightweight Multi-SMTP configuration helper for your CodeIgniter 4 application. This package allows you to use different email accounts simultaneously.

[![CodeIgniter](https://camo.githubusercontent.com/7d6e48acb3b652e933df2f6bb15a0a74d0ff96c1e45dc4869c8b47664763dc83/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f646549676e697465722d253545342e342e382d626c7565)](https://camo.githubusercontent.com/7d6e48acb3b652e933df2f6bb15a0a74d0ff96c1e45dc4869c8b47664763dc83/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f646549676e697465722d253545342e342e382d626c7565)[![PHP Version Require](https://camo.githubusercontent.com/29e76b25f44fd19ba3a88f85f00b3ac7329ffd604075db0fbbeda87f6c794491/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e302d626c7565)](https://camo.githubusercontent.com/29e76b25f44fd19ba3a88f85f00b3ac7329ffd604075db0fbbeda87f6c794491/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e302d626c7565)

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

[](#installation)

```
composer require aselsan/codeigniter4-multi-smtp-config

```

Publish File Config
-------------------

[](#publish-file-config)

```
php spark smtpconfig:publish

```

After that, check the `app/Config/MultiEmail.php` file, and set it up with your email credentials.

Configuring SMTP in the `.env` File
-----------------------------------

[](#configuring-smtp-in-the-env-file)

We recommend setting the configuration for each SMTP email in the `.env` file instead of using `app/Config/MultiEmail.php`.

For example, you can proceed as follows:

```
#--------------------------------------------------------------------
# MULTI-SMTP CONFIGURATION SETTINGS
#--------------------------------------------------------------------

# email.default.fromName =
# email.default.fromEmail =
# email.default.protocol = smtp
# email.default.SMTPUser =
# email.default.SMTPPass =
# email.default.SMTPHost = smtp.gmail.com
# email.default.SMTPPort = 587

# email.outlook.fromName =
# email.outlook.fromEmail =
# email.outlook.protocol = smtp
# email.outlook.SMTPUser =
# email.outlook.SMTPPass =
# email.outlook.SMTPHost = smtp.office365.com
# email.outlook.SMTPPort = 587

```

Usage
-----

[](#usage)

```
helper('multi_email');

$email = multi_email(['mailType' => 'html']);
$email->setTo('example@gmail.com');
$email->setSubject("Test Send Mail");
$email->setMessage('Hi, Bonjour');

if ($email->send(false) === false) {
       throw new Exception('Cannot send email:' . $email->printDebugger(['headers']));
}

// Clear the email
$email->clear();
```

You can use a different mail config by providing the group name in the second parameter.

```
helper('multi_email');

$email = multi_email(['mailType' => 'html'], 'outlook');
$email->setTo('example@gmail.com');
$email->setSubject("Test Send Mail");
$email->setMessage('Hi, Bonjour');

if ($email->send(false) === false) {
       throw new Exception('Cannot send email:' . $email->printDebugger(['headers']));
}

// Clear the email
$email->clear();
```

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](/LICENSE) file for details.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

Total

4

Last Release

660d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/22941122?v=4)[Aselsan](/maintainers/warcooft)[@warcooft](https://github.com/warcooft)

---

Top Contributors

[![warcooft](https://avatars.githubusercontent.com/u/22941122?v=4)](https://github.com/warcooft "warcooft (33 commits)")

---

Tags

codeignitercodeigniter4emailmailerphpphp8smtp

###  Code Quality

Static AnalysisRector

### Embed Badge

![Health badge](/badges/aselsan-codeigniter4-multi-smtp-config/health.svg)

```
[![Health](https://phpackages.com/badges/aselsan-codeigniter4-multi-smtp-config/health.svg)](https://phpackages.com/packages/aselsan-codeigniter4-multi-smtp-config)
```

###  Alternatives

[mattketmo/email-checker

Throwaway email detection library

2752.1M5](/packages/mattketmo-email-checker)[sarfraznawaz2005/noty

Laravel package to incorporate noty flash notifications into laravel.

324.5k](/packages/sarfraznawaz2005-noty)

PHPackages © 2026

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