PHPackages                             taq/delayedmail - 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. taq/delayedmail

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

taq/delayedmail
===============

Queue email messages in files to send them later

1.0.5(10y ago)2231GPLPHPPHP &gt;=5.3.0

Since Sep 18Pushed 8y ago2 watchersCompare

[ Source](https://github.com/taq/delayedmail)[ Packagist](https://packagist.org/packages/taq/delayedmail)[ Docs](http://github.com/taq/delayedmail)[ RSS](/packages/taq-delayedmail/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (5)Used By (0)

Delayed Mail for PHP
====================

[](#delayed-mail-for-php)

This is a simple app for sending emails through PHP without blocking sending and waiting answer from the SMTP server. It provides some classes as:

- `Message` to compose the message
- `Server` to connect to the SMTP server
- `Sender` to run and send the queued messages
- `Runner` to fire a Sender object

How it works
------------

[](#how-it-works)

First we need the server configurations. There is a sample file on the `test`dir, called `delayedmail.ini`:

```
host = smtp.gmail.com
port = 587
user = taq
password = secret
path = /tmp/delayedmailtest

```

The only different parameter there is the `path` parameter. This is where the mail files will be stored.

**VERY IMPORTANT**

If you use two-phase authentication on a Gmail account, **sending emails with this library will not work**. You need a less secure account to make it works.

Storing messages to send later
------------------------------

[](#storing-messages-to-send-later)

The data store used are just regular plain text files. They are stored on the `path` configured above. On that dir there will be another two subdirs:

- `delivery` where the queued messages are.
- `sent`, where the messages are moved *after* `Sender` send them.
- `error`, where the messages are moved if there are some errors on them.

How to use it
-------------

[](#how-to-use-it)

### Queuing messages

[](#queuing-messages)

Just include the `delayedmail.php` on your app, create a new `Server` object, configure it, compose and queue a new message:

```

```

If you check the `delivery` dir now, there will be a file there with the message contents.

You can use arrays on `attach` and `cc`.

### Running the runner

[](#running-the-runner)

Just edit the `runner.php` file with the desired interval and configuration file (usually the same config file as the server) and run it from the command line:

```

```

```
$ php runner.php
- initializing ...
- checking for files in /tmp/delayedmailtest/delivery ...
- no files found.
```

Testing
-------

[](#testing)

### Sending emails

[](#sending-emails)

Go to the `test` directory, configure the `delayedmail.ini` and `test.php` files to the configs you want, and run:

```
$ php test.php

```

And then check your email app on the addresses you configured.

### Code

[](#code)

Run `composer update`, go to the `test` directory and run:

```
$ phpunit .

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity61

Established project with proven stability

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

Total

4

Last Release

3685d ago

### Community

---

Top Contributors

[![taq](https://avatars.githubusercontent.com/u/9789?v=4)](https://github.com/taq "taq (43 commits)")

---

Tags

backgroundemailphp

### Embed Badge

![Health badge](/badges/taq-delayedmail/health.svg)

```
[![Health](https://phpackages.com/badges/taq-delayedmail/health.svg)](https://phpackages.com/packages/taq-delayedmail)
```

###  Alternatives

[tijsverkoyen/css-to-inline-styles

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.

5.8k505.3M228](/packages/tijsverkoyen-css-to-inline-styles)[minishlink/web-push

Web Push library for PHP

1.9k12.0M52](/packages/minishlink-web-push)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[spatie/url-signer

Generate a url with an expiration date and signature to prevent unauthorized access

4422.3M16](/packages/spatie-url-signer)[mattketmo/email-checker

Throwaway email detection library

2742.0M5](/packages/mattketmo-email-checker)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)

PHPackages © 2026

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