PHPackages                             texxasrulez/scheduled\_sending - 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. texxasrulez/scheduled\_sending

ActiveRoundcube-plugin[Mail &amp; Notifications](/categories/mail)

texxasrulez/scheduled\_sending
==============================

Roundcube plugin: Schedule to send emails at a later time.

1.3.0(4mo ago)51895GPL-3.0PHPPHP &gt;=7.4

Since Aug 19Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/texxasrulez/scheduled_sending)[ Packagist](https://packagist.org/packages/texxasrulez/scheduled_sending)[ Docs](https://github.com/texxasrulez/scheduled_sending)[ RSS](/packages/texxasrulez-scheduled-sending/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)DependenciesVersions (6)Used By (0)

Scheduled Sending
=================

[](#scheduled-sending)

[![Downloads](https://camo.githubusercontent.com/e26d4984d36f3ea5ae967727f3c73c87ed31f617561a22cd65cc2cb8c26b808a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f74657878617372756c657a2f7363686564756c65645f73656e64696e672f746f74616c3f7374796c653d706c6173746963266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465266c6162656c3d446f776e6c6f616473266c6162656c436f6c6f723d6171756126636f6c6f723d626c7565)](https://camo.githubusercontent.com/e26d4984d36f3ea5ae967727f3c73c87ed31f617561a22cd65cc2cb8c26b808a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f74657878617372756c657a2f7363686564756c65645f73656e64696e672f746f74616c3f7374796c653d706c6173746963266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465266c6162656c3d446f776e6c6f616473266c6162656c436f6c6f723d6171756126636f6c6f723d626c7565)[![Packagist Downloads](https://camo.githubusercontent.com/31e2b962e04931e6f521583ac5a9c6579da1308a3b1eb1ed951033ce10f9532b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74657878617372756c657a2f7363686564756c65645f73656e64696e673f7374796c653d706c6173746963266c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465266c6162656c3d446f776e6c6f616473266c6162656c436f6c6f723d626c756526636f6c6f723d676f6c64)](https://packagist.org/packages/texxasrulez/scheduled_sending)[![Packagist Version](https://camo.githubusercontent.com/15651670bd07b91513a67f195c1b7e78b6e8ea86b6ff1a8d96159c33496fa2bd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74657878617372756c657a2f7363686564756c65645f73656e64696e673f7374796c653d706c6173746963266c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465266c6162656c3d56657273696f6e266c6162656c436f6c6f723d626c756526636f6c6f723d6c696d65677265656e)](https://packagist.org/packages/texxasrulez/scheduled_sending)[![Github License](https://camo.githubusercontent.com/3e6a1a0fd966acce09d77b90b2eac69fb6f16206c01d5e5f8fa4e48f69951de4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f74657878617372756c657a2f7363686564756c65645f73656e64696e673f7374796c653d706c6173746963266c6f676f3d676974687562266c6162656c3d4c6963656e7365266c6162656c436f6c6f723d626c756526636f6c6f723d636f72616c)](https://github.com/texxasrulez/scheduled_sending/LICENSE)[![GitHub Stars](https://camo.githubusercontent.com/6f9fdb7f8eddb1aa9f4fb4e9075261a2983d3bdbb26c3fd85f85d28dbd1bd544/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f74657878617372756c657a2f7363686564756c65645f73656e64696e673f7374796c653d706c6173746963266c6f676f3d676974687562266c6162656c3d5374617273266c6162656c436f6c6f723d626c756526636f6c6f723d64656570736b79626c7565)](https://github.com/texxasrulez/scheduled_sending/stargazers)[![GitHub Issues](https://camo.githubusercontent.com/42fe5b528d08b844862c093dd73dacdf16a2ad5b353a19ef346945953b2c34c5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f74657878617372756c657a2f7363686564756c65645f73656e64696e673f7374796c653d706c6173746963266c6f676f3d676974687562266c6162656c3d497373756573266c6162656c436f6c6f723d626c756526636f6c6f723d61717561)](https://github.com/texxasrulez/scheduled_sending/issues)[![GitHub Contributors](https://camo.githubusercontent.com/b3ddf6ac740f5bcad840f425a7b9b751006fca57d7cdf7acebf7df72df8641ca/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f74657878617372756c657a2f7363686564756c65645f73656e64696e673f7374796c653d706c6173746963266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465266c6162656c3d436f6e7472696275746f7273266c6162656c436f6c6f723d626c756526636f6c6f723d6f7263686964)](https://github.com/texxasrulez/scheduled_sending/graphs/contributors)[![GitHub Forks](https://camo.githubusercontent.com/c6dab2bf21b1c24191f47b5e95e77c5bd22151242bcd0604a9d2f728c105780f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f74657878617372756c657a2f7363686564756c65645f73656e64696e673f7374796c653d706c6173746963266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465266c6162656c3d466f726b73266c6162656c436f6c6f723d626c756526636f6c6f723d6461726b6f72616e6765)](https://github.com/texxasrulez/scheduled_sending/forks)[![Donate Paypal](https://camo.githubusercontent.com/02124075ee7ea4c192ef867cb30577b0b43ba74ea42b8dbe20b56ef518d94cdb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50617970616c2d4d6f6e65795f506c65617365212d626c75652e7376673f7374796c653d706c6173746963266c6162656c436f6c6f723d626c756526636f6c6f723d666f72657374677265656e266c6f676f3d70617970616c)](https://www.paypal.me/texxasrulez)

Schedule messages to be transmitted when you want them to go, including messages with attachments.

Scheduled Sending — Installation Guide for Roundcube
====================================================

[](#scheduled-sending--installation-guide-for-roundcube)

This plugin lets users **schedule emails to be sent later**. It includes a web UI, localization, and CLI helpers to trigger a **queue worker** that delivers messages when they’re due.

This guide covers both **Composer-based** and **manual** installation, database setup, configuration, and setting up the worker trigger (cron/systemd).

---

1) Requirements
---------------

[](#1-requirements)

- Roundcube (modern version; plugin uses standard `rcube_plugin` API).
- PHP compatible with your Roundcube (PHP 8.x recommended).
- Database access for creating the plugin table.
- Ability to run a periodic job (cron or systemd timer) to call the worker endpoint.
- Web access to your Roundcube URL for the worker (or curl from cron).

---

2) Install the plugin
---------------------

[](#2-install-the-plugin)

### Option A — Composer (preferred)

[](#option-a--composer-preferred)

1. Place the plugin in a VCS or local path that Composer can reference.
2. Ensure your Roundcube root has the **Roundcube plugin installer** in `require` (most distros do):

    ```
    "require": {
      "roundcube/plugin-installer": "^0.3"
    }
    ```
3. Add a repository that points to the plugin (adjust the path):

    ```
    "repositories": [
      { "type": "path", "url": "../scheduled_sending_composer" }
    ],
    "require": {
      "texxasrulez/scheduled_sending": "*"
    }
    ```
4. Run:

    ```
    composer install
    # or
    composer require texxasrulez/scheduled_sending:*
    ```

> Composer will install the plugin under `plugins/scheduled_sending` (per its `composer.json`).

### Option B — Manual install

[](#option-b--manual-install)

1. Unzip the plugin into Roundcube’s plugins directory: ```
    cd /path/to/roundcube
    unzip /tmp/scheduled_sending.zip -d plugins/scheduled_sending
    ```
2. Ensure permissions match your web server user: ```
    chown -R www-data:www-data plugins/scheduled_sending (or tailor to your server's user:group)
    find plugins/scheduled_sending -type d -exec chmod 755 {} \;
    find plugins/scheduled_sending -type f -exec chmod 644 {} \;
    ```

---

3) Database schema
------------------

[](#3-database-schema)

Create the queue table (MySQL/MariaDB):

- File: `plugins/scheduled_sending/SQL/mysql.initial.sql`
- SQL (for convenience):

```
CREATE TABLE `scheduled_queue` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `identity_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0,
  `scheduled_at` datetime NOT NULL,
  `status` varchar(16) NOT NULL DEFAULT 'queued',
  `raw_mime` mediumtext DEFAULT NULL,
  `meta_json` text DEFAULT NULL,
  `dedupe_key` varchar(64) DEFAULT NULL,
  `last_error` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

ALTER TABLE `scheduled_queue`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uq_scheduled_dedupe` (`dedupe_key`),
  ADD KEY `idx_sched_at` (`scheduled_at`),
  ADD KEY `idx_status` (`status`);

ALTER TABLE `scheduled_queue`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
COMMIT;
```

> If you use a database other than MySQL/MariaDB, adapt the SQL accordingly.

---

4) Configuration
----------------

[](#4-configuration)

Copy the example config and edit it:

```
cd plugins/scheduled_sending
cp config.inc.php.dist config.inc.php
```

Key options (from `config.inc.php.dist`):

```
$config['scheduled_sending_table']       = 'scheduled_queue';
$config['scheduled_worker_batch']        = 20;
$config['scheduled_timezone']            = 'America/Chicago'; // optional; storage is UTC
$config['scheduled_debug']               = false;
$config['scheduled_force_plugin_assets'] = false;
$config['scheduled_show_fab']            = true;

$config['scheduled_sending_worker_token'] = '32_character_key';
$config['scheduled_sending_delivery']     = 'smtp';  // 'smtp', 'mail', or 'none' for dry-run
$config['scheduled_sending_batch']        = 25;      // optional
$config['scheduled_sending_sent_folder']  = 'Sent';  // optional

$config['db_table_scheduled_sending']     = 'scheduled_queue';

$config['scheduled_sending_lock_key']     = 'scheduled_sending_worker';
$config['scheduled_sending_lock_timeout'] = 10; // seconds
```

**Important: set a strong** `scheduled_sending_worker_token` (32+ random characters).

---

5) Enable the plugin in Roundcube
---------------------------------

[](#5-enable-the-plugin-in-roundcube)

Edit your Roundcube main config (e.g. `config/config.inc.php`) and add the plugin name:

```
// Add 'scheduled_sending' to the plugins array
$config['plugins'] = array_merge($config['plugins'] ?? [], ['scheduled_sending']);
```

Clear Roundcube caches if needed (e.g., remove `temp/*` &amp; `cache/*` contents, keeping the dirs).

---

6) Queue worker — how delivery is triggered
-------------------------------------------

[](#6-queue-worker--how-delivery-is-triggered)

The plugin exposes an **HTTP worker action** that sends all messages scheduled at or before “now”. The worker requires the token from your `config.inc.php`.

**Worker URL shape:**

```
https://YOUR-ROUNDCUBE-BASE/?_task=mail&_action=plugin.scheduled_sending.send_due&_token=32_character_key

```

There are two convenient ways to call it periodically:

### A) Via provided CLI helper (recommended)

[](#a-via-provided-cli-helper-recommended)

- `bin/scheduled_queue_worker.php` makes an HTTP request to the worker URL.
- `bin/scheduled_send.php` is a shim that requires the worker script.

**Examples:**

```
# Using CLI flags
php plugins/scheduled_sending/bin/scheduled_queue_worker.php   --url="https://mail.example.com/roundcube/"   --token="32_character_key"

# Or via environment variables
SS_WORKER_URL="https://mail.example.com/roundcube/" SS_WORKER_TOKEN="32_character_key" php plugins/scheduled_sending/bin/scheduled_queue_worker.php
```

**Cron:** run once per minute (or every 5 minutes if your use-case is lax):

```
* * * * * SS_WORKER_URL="https://mail.example.com/roundcube/" SS_WORKER_TOKEN="32_character_key"     php /var/www/roundcube/plugins/scheduled_sending/bin/scheduled_queue_worker.php >> /var/log/roundcube/scheduled_worker.log 2>&1
```

### B) Direct HTTP call (curl/wget)

[](#b-direct-http-call-curlwget)

```
curl -fsS "https://mail.example.com/roundcube/?_task=mail&_action=plugin.scheduled_sending.send_due&_token=32_character_key"
```

Cron variant:

```
* * * * * curl -fsS "https://mail.example.com/roundcube/?_task=mail&_action=plugin.scheduled_sending.send_due&_token=32_character_key" >> /var/log/roundcube/scheduled_worker.log 2>&1
```

> The worker is idempotent and gated by a lock (`scheduled_sending_lock_key` / timeout) to avoid overlap.

---

7) Verifying
------------

[](#7-verifying)

1. Log in to Roundcube, compose a message, pick a **future time**, and schedule.
2. Confirm a row is added to the `scheduled_queue` table.
3. Ensure your cron/systemd job runs; the message should send at/after the scheduled time.
4. Check logs:
    - Web server access/error logs
    - `logs/` or a dedicated log (the plugin writes via `rcube::write_log('scheduled_sending', ...)` when enabled)
5. Confirm sent messages land in the configured **Sent** folder (if set).

---

8) Troubleshooting
------------------

[](#8-troubleshooting)

- **401/403 on worker call**: bad or missing `_token`. Verify `scheduled_sending_worker_token` matches the value you pass.
- **Nothing gets sent**: verify the cron is running and the URL points to your Roundcube base. Check that due items exist in `scheduled_queue` and `status` is `queued`.
- **Timezones**: UI may use `scheduled_timezone`; storage is UTC. Ensure your server clock is correct (NTP) and PHP `date.timezone` is set.
- **Mail transport**: `scheduled_sending_delivery` uses Roundcube’s SMTP by default. If using `mail` or a relay, ensure it’s configured correctly in Roundcube.
- **Locks**: if you see messages about an active lock, either reduce the cron frequency or increase `scheduled_sending_lock_timeout`.

---

9) Uninstall
------------

[](#9-uninstall)

- Remove the plugin folder or uninstall via Composer.
- Optionally drop the table: ```
    DROP TABLE IF EXISTS `scheduled_queue`;
    ```

---

10) File map (high-level)
-------------------------

[](#10-file-map-high-level)

- `scheduled_sending.php` — main plugin class (registers actions/UI)
- `config.inc.php.dist` — example configuration
- `SQL/mysql.initial.sql` — schema for the queue table
- `bin/scheduled_queue_worker.php` — CLI helper (HTTP to worker)
- `bin/scheduled_send.php` — thin wrapper including the worker helper
- `templates/` — Roundcube templates for UI
- `localization/` — i18n strings
- `skins/` / `js/` — assets

---

**That’s it.** Once the table exists, the config is set (especially `_token`), and the cron/systemd job is running, scheduled emails will go out on time.

Enjoy!

💰 **Donations** 💰

If you use this plugin and would like to show your appreciation by buying me a cup of coffee, I surely would appreciate it. A regular cup of Joe is sufficient, but a Starbucks Coffee would be better ...
Zelle (Zelle is integrated within many major banks Mobile Apps by default) - Just send to texxasrulez at yahoo dot com
No Zelle in your banks mobile app, no problem, just click [Paypal](https://paypal.me/texxasrulez?locale.x=en_US) and I can make a Starbucks run ...

I appreciate the interest in this plugin and hope all the best ...

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance83

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 86.8% 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 ~29 days

Total

5

Last Release

149d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/95c3af6e41a9786e8be2edb48176e43a7d1ddef429793a312168450ff4269deb?d=identicon)[texxasrulez](/maintainers/texxasrulez)

---

Top Contributors

[![texxasrulez](https://avatars.githubusercontent.com/u/10519182?v=4)](https://github.com/texxasrulez "texxasrulez (46 commits)")[![koenr](https://avatars.githubusercontent.com/u/2964998?v=4)](https://github.com/koenr "koenr (4 commits)")[![poremland](https://avatars.githubusercontent.com/u/1761269?v=4)](https://github.com/poremland "poremland (3 commits)")

### Embed Badge

![Health badge](/badges/texxasrulez-scheduled-sending/health.svg)

```
[![Health](https://phpackages.com/badges/texxasrulez-scheduled-sending/health.svg)](https://phpackages.com/packages/texxasrulez-scheduled-sending)
```

###  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.3M227](/packages/tijsverkoyen-css-to-inline-styles)[minishlink/web-push

Web Push library for PHP

1.9k12.0M53](/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)
