PHPackages                             cpsit/typo3-mailqueue - 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. cpsit/typo3-mailqueue

ActiveTypo3-cms-extension[Mail &amp; Notifications](/categories/mail)

cpsit/typo3-mailqueue
=====================

TYPO3 CMS extension to improve TYPO3's mail spooler with additional components

0.5.2(2mo ago)511.7k↓18.5%1[1 PRs](https://github.com/CPS-IT/mailqueue/pulls)GPL-2.0-or-laterPHPPHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0CI passing

Since Mar 5Pushed 1mo ago5 watchersCompare

[ Source](https://github.com/CPS-IT/mailqueue)[ Packagist](https://packagist.org/packages/cpsit/typo3-mailqueue)[ RSS](/packages/cpsit-typo3-mailqueue/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (30)Versions (22)Used By (0)Security (2)

[![Extension icon](Resources/Public/Icons/Extension.svg)](Resources/Public/Icons/Extension.svg)

TYPO3 extension `mailqueue`
===========================

[](#typo3-extension-mailqueue)

[![Coverage](https://camo.githubusercontent.com/226d813bcb240ec6702b27588fea78887a94fdc0b407b97d78cdecfad6dc4da9/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c73436f7665726167652f6769746875622f4350532d49542f6d61696c71756575653f6c6f676f3d636f766572616c6c73)](https://coveralls.io/github/CPS-IT/mailqueue)[![CGL](https://github.com/CPS-IT/mailqueue/actions/workflows/cgl.yaml/badge.svg)](https://github.com/CPS-IT/mailqueue/actions/workflows/cgl.yaml)[![Release](https://github.com/CPS-IT/mailqueue/actions/workflows/release.yaml/badge.svg)](https://github.com/CPS-IT/mailqueue/actions/workflows/release.yaml)[![License](https://camo.githubusercontent.com/b4bba8d884cb30d97fdb16365c60a9b99680a38815f2f9e120009d9ab87152e5/687474703a2f2f706f7365722e707567782e6f72672f63707369742f7479706f332d6d61696c71756575652f6c6963656e7365)](LICENSE.md)
[![Version](https://camo.githubusercontent.com/593ae15657b027f1d4586aa5bdb9bbdff79dfdcaa85d6465f9a94c2751b59ec2/68747470733a2f2f736869656c64732e696f2f656e64706f696e743f75726c3d68747470733a2f2f7479706f332d6261646765732e6465762f62616467652f6d61696c71756575652f76657273696f6e2f736869656c6473)](https://extensions.typo3.org/extension/mailqueue)[![Downloads](https://camo.githubusercontent.com/eafc0779ca01473545dd8bfe9da979e292579c4f9acff0b3718f592fda6b86bb/68747470733a2f2f736869656c64732e696f2f656e64706f696e743f75726c3d68747470733a2f2f7479706f332d6261646765732e6465762f62616467652f6d61696c71756575652f646f776e6c6f6164732f736869656c6473)](https://extensions.typo3.org/extension/mailqueue)[![Supported TYPO3 versions](https://camo.githubusercontent.com/2d0246232d6fd44e3c7b2ea488101528ae9c328c7938d337d4ab8da92b18805d/68747470733a2f2f736869656c64732e696f2f656e64706f696e743f75726c3d68747470733a2f2f7479706f332d6261646765732e6465762f62616467652f6d61696c71756575652f7479706f332f736869656c6473)](https://extensions.typo3.org/extension/mailqueue)[![Extension stability](https://camo.githubusercontent.com/e150b3b7acbc035b74e64c585e37a3f4dc4df2498d21b24b5b9e867b7e6769be/68747470733a2f2f736869656c64732e696f2f656e64706f696e743f75726c3d68747470733a2f2f7479706f332d6261646765732e6465762f62616467652f6d61696c71756575652f73746162696c6974792f736869656c6473)](https://extensions.typo3.org/extension/mailqueue)

📦 [Packagist](https://packagist.org/packages/cpsit/typo3-mailqueue) | 🐥 [TYPO3 extension repository](https://extensions.typo3.org/extension/mailqueue) | 💾 [Repository](https://github.com/CPS-IT/mailqueue) | 🐛 [Issue tracker](https://github.com/CPS-IT/mailqueue/issues)

---

An extension for TYPO3 CMS that extends TYPO3's mail spooling functionality with an extended queueable mail transport interface. In addition, it provides an improved version of TYPO3's `FileSpooler`. In order to make mails in the mail queue visible, the extension provides an (admin-only) backend module and console commands to list and flush the mail queue.

🚀 Features
----------

[](#-features)

- Extended interface for queueable mail transports
- Improved queueable file transport with failure metadata
- Backend module to list mails in queue
- Console command to list queue and flush mails
- Compatible with TYPO3 12.4 LTS and 13.4 LTS

🔥 Installation
--------------

[](#-installation)

### Composer

[](#composer)

```
composer require cpsit/typo3-mailqueue
```

### TER

[](#ter)

Alternatively, you can download the extension via the [TYPO3 extension repository (TER)](https://extensions.typo3.org/extension/mailqueue).

⚡ Usage
-------

[](#-usage)

Note

In order to use a queueable mail transport, you need to [configure](#mail-settings)it in your system settings, along with the required transport settings.

### Concept

[](#concept)

The extension builds on TYPO3's [mail spooling](https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Mail/Index.html#spooling) feature. It provides an extended interface [`CPSIT\Typo3Mailqueue\Mail\Transport\QueueableTransport`](Classes/Mail/Transport/QueueableTransport.php)for `TYPO3\CMS\Core\Mail\DelayedTransportInterface` with additional methods to enqueue and dequeue mails:

- ```
    public function getMailQueue(): Mail\Queue\MailQueue
    ```

    Returns an instance of [`CPSIT\Typo3Mailqueue\Mail\Queue\MailQueue`](Classes/Mail/Queue/MailQueue.php)that holds all currently enqueued mails as instances of [`CPSIT\Typo3Mailqueue\Mail\Queue\MailQueueItem`](Classes/Mail/Queue/MailQueueItem.php).
- ```
    public function enqueue(Mime\RawMessage $message, ?Mailer\Envelope $envelope = null): Mail\Queue\MailQueueItem
    ```

    Allows to enqueue a mail to the mail queue. This is basically identical to the `send()`method provided by the base `Symfony\Component\Mailer\Transport\TransportInterface`.
- ```
    public function dequeue(Mail\Queue\MailQueueItem $item, Mailer\Transport\TransportInterface $transport): bool
    ```

    Sends the message of a given mail queue item with the provided "real" transport, effectively dequeuing it from the mail queue. This is basically identical to the `flushQueue()` method provided by the base `TYPO3\CMS\Core\Mail\DelayedTransportInterface`with the difference that it only dequeues the given mail queue item and leaves the rest of the queue untouched.
- ```
    public function delete(Mail\Queue\MailQueueItem $item): bool
    ```

    Deletes the message of a given mail queue item without sending it. The message is also dequeued from the mail queue.

#### Recoverable transports

[](#recoverable-transports)

Next to the `QueueableTransport` interface there exists an extended interface [`CPSIT\Typo3Mailqueue\Mail\Transport\RecoverableTransport`](Classes/Mail/Transport/RecoverableTransport.php). It allows to recover stuck mails with a configured recover timeout:

- ```
    public function recover(int $timeout = 900): void
    ```

    Recovers mails that are enqueued for longer than the given timeout (in seconds) and are in "sending" state. Recovering a mail resets their mail state from "sending" to "queued". They will then be sent again on dequeue or when the mail queue is flushed.

### Backend module

[](#backend-module)

Note

Only administrators can see the backend module.

[![Screenshot backend module](Documentation/Images/ScreenshotBackendModule.png)](Documentation/Images/ScreenshotBackendModule.png)

The backend module lists all currently enqueued mails. In addition, for supported transports it may also show transport failure details. It can be used to get a quick overview about the health state of the mail queue. It also allows to dequeue single mails from the mail queue by sending them with the configured real transport.

### Console commands

[](#console-commands)

#### Flush queue

[](#flush-queue)

[![Screenshot "mailqueue:flushqueue" console command](Documentation/Images/ScreenshotFlushQueueCommand.png)](Documentation/Images/ScreenshotFlushQueueCommand.png)

The extension provides a console command to flush the mail queue:

```
typo3 mailqueue:flushqueue [-l|--limit] [-r|--recover-timeout] [-j|--json]
```

The number of mails to be sent can be limited with `--limit` (or `-l`). If no limit is passed, the whole mail queue is flushed.

For transports implementing the `RecoverableTransport` interface, the recover timeout can be configured with `--recover-timeout` (or `-r`).

When using `--json` (or `-j`), user-oriented output is written to stderr and result messages are written in JSON format to stdout.

#### List queue

[](#list-queue)

[![Screenshot "mailqueue:listqueue" console command](Documentation/Images/ScreenshotListQueueCommand.png)](Documentation/Images/ScreenshotListQueueCommand.png)

The extension provides a console command to list enqueued mails:

```
typo3 mailqueue:listqueue [-s|--strict] [-w|--watch]
```

With `--strict` (or `-s`) enabled, the command exits with a non-zero exit code in case any enqueued mail could not be delivered because of a failure.

In addition, a watch mode can be enabled with `--watch` (or `-w`) which updates the list every five seconds. The watch mode can be exited with Ctrl+C.

### Available transports

[](#available-transports)

The extension provides two custom implementations as XClasses for TYPO3's native mail spoolers:

TYPO3 core implementationCustom implementation (XClass)`TYPO3\CMS\Core\Mail\FileSpool`[`CPSIT\Typo3Mailqueue\Mail\Transport\QueueableFileTransport`](Classes/Mail/Transport/QueueableFileTransport.php)`TYPO3\CMS\Core\Mail\MemorySpool`[`CPSIT\Typo3Mailqueue\Mail\Transport\QueueableMemoryTransport`](Classes/Mail/Transport/QueueableMemoryTransport.php)📂 Configuration
---------------

[](#-configuration)

### Mail settings

[](#mail-settings)

Queueable mail transports are registered the "normal" way as described in the [official TYPO3 core documentation](https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/Configuration/Typo3ConfVars/MAIL.html#confval-globals-typo3-conf-vars-mail-transport-spool-type). Add the following to your system configuration (e.g. in `additional.php`/`AdditionalConfiguration.php`):

```
# File transport
$GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_spool_type'] = 'file';
$GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_spool_filepath'] = '/path/to/mailqueue';

# Memory transport
$GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_spool_type'] = 'memory';

# Use any other custom mail transport
# Note: Custom transports must implement CPSIT\Typo3Mailqueue\Mail\Transport\QueueableTransport interface!
$GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_spool_type'] = \Vendor\Extension\Mail\Transport\CustomQueueableTransport::class;
```

### Extension configuration

[](#extension-configuration)

The following extension configuration options are available:

Configuration keyDescriptionRequiredDefault**`queue.delayThreshold`**Number in seconds after which a mail in the queue is considered "delayed"–`1800`**`pagination.itemsPerPage`**Number of mails to display on a single page in backend module–`20`🧑‍💻 Contributing
----------------

[](#‍-contributing)

Please have a look at [`CONTRIBUTING.md`](CONTRIBUTING.md).

💎 Credits
---------

[](#-credits)

The extension icon ("envelope-open") as well as the icon for the backend module are modified versions of the original [`actions-envelope-open`](https://typo3.github.io/TYPO3.Icons/icons/actions/actions-envelope-open.html) icon from TYPO3 core which is originally licensed under [MIT License](https://github.com/TYPO3/TYPO3.Icons/blob/main/LICENSE).

⭐ License
---------

[](#-license)

This project is licensed under [GNU General Public License 2.0 (or later)](LICENSE.md).

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance88

Actively maintained with recent releases

Popularity31

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 55.7% 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 ~41 days

Recently: every ~14 days

Total

19

Last Release

63d ago

PHP version history (3 changes)0.1.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0

0.4.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0

0.5.0PHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/144cefe55242b883c87cb537463f3ba75a0f8198fc5b602b50c838aae31fe7ee?d=identicon)[eliashaeussler](/maintainers/eliashaeussler)

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

---

Top Contributors

[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (190 commits)")[![eliashaeussler](https://avatars.githubusercontent.com/u/16313625?v=4)](https://github.com/eliashaeussler "eliashaeussler (147 commits)")[![konhill](https://avatars.githubusercontent.com/u/138134934?v=4)](https://github.com/konhill "konhill (4 commits)")

---

Tags

delayextensionmailqueuespooltransporttypo3-cms

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cpsit-typo3-mailqueue/health.svg)

```
[![Health](https://phpackages.com/badges/cpsit-typo3-mailqueue/health.svg)](https://phpackages.com/packages/cpsit-typo3-mailqueue)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.7k509.9M17.0k](/packages/laravel-framework)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)

PHPackages © 2026

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