PHPackages                             0ruialvel0/codeigniter4-emailqueue - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. 0ruialvel0/codeigniter4-emailqueue

ActiveLibrary[Queues &amp; Workers](/categories/queues)

0ruialvel0/codeigniter4-emailqueue
==================================

A CodeIgniter 4 addin to handle queued email sending via CLI and cron.

v1.0.2(8mo ago)226[4 issues](https://github.com/0RuiAlvel0/codeigniter4-emailQueue/issues)MITPHPPHP &gt;=8.2

Since Oct 5Pushed 8mo agoCompare

[ Source](https://github.com/0RuiAlvel0/codeigniter4-emailQueue)[ Packagist](https://packagist.org/packages/0ruialvel0/codeigniter4-emailqueue)[ RSS](/packages/0ruialvel0-codeigniter4-emailqueue/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

CodeIgniter4 Email Queue
========================

[](#codeigniter4-email-queue)

A CodeIgniter 4 addin to manage and send queued emails via CLI. Designed for cron-based dispatching.

Features
--------

[](#features)

- CLI command `email:sendqueue` to process unsent emails
- Migration for `email_queue` table
- Retry logic with attempt tracking

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

[](#installation)

```
composer require 0ruialvel0/codeigniter4-emailqueue
```

Usage
-----

[](#usage)

1. Run the migration:

```
spark migrate -n EmailQueueModule
```

2. Schedule the command via cron:

```
php spark email:sendqueue
```

Some notes on the cron job:

1. The script has CLI output, ensure to pipe the output to the ether.
2. The interval at which the script will send emails out is the frequency at which cron triggers it. See what makes sense for your use case.

```
# Add this to cron to process the sending of emails every 1 min and make output disappear (adjust to your spark path):
* * * * * php /var/www/html/spark email:sendqueue >> /dev/null 2>&1
```

Configuration
-------------

[](#configuration)

Ensure your email settings are configured in app/Config/Email.php.

Practical example
-----------------

[](#practical-example)

Assuming a proper fresh CI4 installation with a database already linked to it. We are going to send a queued email every time we reques the home page (this for a practical example only, of course).

1. Install the package.
2. Run the migration to create the email\_queue table.
3. Create a view called email\_test\_view.php and put "Hello" inside of it.
4. On the Home controller add

```
// Test of Email Queue addin
// Put this in the queue to send out an email
$emailQueueModel = new \EmailQueueModule\Models\EmailQueueModel();
$email = 'test@example.com';
$emailQueueModel->insert([
	'to' => $email,
	'subject' => 'You’ve been Invited to Join the coolest community ever',
	'message' => view('email_test_view', []),
	'created_at' => date('Y-m-d H:i:s'),
]);
```

verify that the entry showed up on the email\_queue table.

5. Run

```
spark email:sendqueue
```

It should send your email out if you have the email sender configured properly. Whenever it is not sent successfully, it will increment the attempts column until it can send the email at which point, it will update the sent\_at column and leave it forever in the database unless (recommended) you implment another service to clean the table. I may write the service to clean up if there is demand.

License
-------

[](#license)

MIT

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community6

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

Total

3

Last Release

259d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b576cb8ea344cd086525e00e6f1ae368a25a293af48dc31599f8d453ae3f12f2?d=identicon)[0RuiAlvel0](/maintainers/0RuiAlvel0)

---

Top Contributors

[![0RuiAlvel0](https://avatars.githubusercontent.com/u/8639820?v=4)](https://github.com/0RuiAlvel0 "0RuiAlvel0 (6 commits)")

### Embed Badge

![Health badge](/badges/0ruialvel0-codeigniter4-emailqueue/health.svg)

```
[![Health](https://phpackages.com/badges/0ruialvel0-codeigniter4-emailqueue/health.svg)](https://phpackages.com/packages/0ruialvel0-codeigniter4-emailqueue)
```

###  Alternatives

[league/geotools

Geo-related tools PHP 7.3+ library

1.4k5.5M29](/packages/league-geotools)[illuminate/bus

The Illuminate Bus package.

6045.5M504](/packages/illuminate-bus)[uecode/qpush-bundle

Asynchronous processing for Symfony using Push Queues

1672.5M2](/packages/uecode-qpush-bundle)[codeigniter4/appstarter

CodeIgniter4 starter app

1781.8M](/packages/codeigniter4-appstarter)[abydahana/aksara

Aksara is a CodeIgniter based CRUD Toolkit you can use to build complex applications become shorter, secure and more reliable just in a few lines of code. Serving both CMS or Framework, produce both HEADLESS (RESTful API) or TRADITIONAL (Browser Based), just by writing single controller. Yet it's reusable, scalable and ready to use!

1111.2k](/packages/abydahana-aksara)

PHPackages © 2026

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