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(7mo ago)216[4 issues](https://github.com/0RuiAlvel0/codeigniter4-emailQueue/issues)MITPHPPHP &gt;=8.2

Since Oct 5Pushed 7mo 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 1mo 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

30

—

LowBetter than 65% of packages

Maintenance45

Moderate activity, may be stable

Popularity10

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

214d 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.3M26](/packages/league-geotools)[amphp/parser

A generator parser to make streaming parsers simple.

14952.8M16](/packages/amphp-parser)[amphp/serialization

Serialization tools for IPC and data storage in PHP.

13451.1M18](/packages/amphp-serialization)[enqueue/enqueue

Message Queue Library

19820.0M56](/packages/enqueue-enqueue)[deliciousbrains/wp-background-processing

WP Background Processing can be used to fire off non-blocking asynchronous requests or as a background processing tool, allowing you to queue tasks.

1.1k409.8k6](/packages/deliciousbrains-wp-background-processing)[react/async

Async utilities and fibers for ReactPHP

2238.8M170](/packages/react-async)

PHPackages © 2026

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