PHPackages                             oshco/mail-queue - 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. oshco/mail-queue

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

oshco/mail-queue
================

Simple middleware to queue email messages in WebFiori applications.

v1.0.1(1y ago)11.4kPHPPHP &gt;=7.0

Since Oct 16Pushed 1y ago1 watchersCompare

[ Source](https://github.com/OSHCO/mail-queue)[ Packagist](https://packagist.org/packages/oshco/mail-queue)[ RSS](/packages/oshco-mail-queue/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Mail Queue
==========

[](#mail-queue)

A middleware for queing emails in WebFiori.

The aim of this class library is to provide a middleware which will be executed after the request is processed by the application. This will reduce wait time before the application sends the response.

Classes
-------

[](#classes)

- [MailQueue](https://github.com/OSHCO/mail-queue/blob/main/oshco/middleware/MailQueue.php): The core class of th library.

Usage
-----

[](#usage)

### Registering the Middleware

[](#registering-the-middleware)

First step in using the middleware is to register it under your WebFiori Application. To register the middleware, modify the code on the class `[APP_DIR]\ini\InitMiddleware` as follows:

```
use oshco\middleware\MailQueue;
use webfiori\framework\middleware\MiddlewareManager;

class InitMiddleware {
    public static function init() {
        MiddlewareManager::register(MailQueue::get());
    }
}
```

### Using The Middleware

[](#using-the-middleware)

The messages that will be registered must be of type `webfiori\email\Email`. Following code snippit shows a basic use case.

```
$mail1 = new Email($sendAccount);
$mail1->addTo('someoneh@example.com');
MailQueue::enqueue(mail1)
```

License
-------

[](#license)

The library is licensed under MIT license.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

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

Total

2

Last Release

530d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9354222d322c9350ffca453dd07926f71a4b021a69c3157190dc0adc100b1c78?d=identicon)[oshco](/maintainers/oshco)

---

Top Contributors

[![usernane](https://avatars.githubusercontent.com/u/12120015?v=4)](https://github.com/usernane "usernane (13 commits)")

---

Tags

emailqueuewebfiori

### Embed Badge

![Health badge](/badges/oshco-mail-queue/health.svg)

```
[![Health](https://phpackages.com/badges/oshco-mail-queue/health.svg)](https://phpackages.com/packages/oshco-mail-queue)
```

###  Alternatives

[pelago/emogrifier

Converts CSS styles into inline style attributes in your HTML code

94944.1M110](/packages/pelago-emogrifier)[zbateson/mail-mime-parser

MIME email message parser

54149.2M79](/packages/zbateson-mail-mime-parser)[nterms/yii2-mailqueue

Email queue component for yii2 that works with yii2-swiftmailer.

87129.2k2](/packages/nterms-yii2-mailqueue)[lorenzo/cakephp-email-queue

Queue, preview and and send emails stored in the database

57121.5k1](/packages/lorenzo-cakephp-email-queue)[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)
