This commit is contained in:
Javier Casares 2026-02-18 15:24:59 +00:00
commit 0ece5f3a6d
16 changed files with 2342 additions and 785 deletions

View file

@ -1,52 +1,88 @@
=== SMTP (by ROBOTSTXT) Newsletter ===
Contributors: robotstxt
Tags: newsletter, smtp, email, bulk, amazonses
Tags: newsletter, smtp, email, bulk, queue, worker, amazonses, statistics
Requires at least: 4.7
Tested up to: 6.9
Requires PHP: 7.2
Stable tag: 2.1.0
Stable tag: 2.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Integrates ROBOTSTXT SMTP configuration with Newsletter plugin for efficient bulk email delivery with SMTPKeepAlive support.
Integrates ROBOTSTXT SMTP configuration with Newsletter plugin for reliable bulk email delivery with database-backed queue and external workers.
== Description ==
SMTP (by ROBOTSTXT) Newsletter connects your Newsletter plugin with ROBOTSTXT SMTP and Amazon SES plugins, enabling **20-30x faster bulk email sending** through SMTPKeepAlive technology.
SMTP (by ROBOTSTXT) Newsletter connects your Newsletter plugin with ROBOTSTXT SMTP and Amazon SES plugins, providing **reliable, scalable bulk email delivery** through a database-backed queue system with external worker processes.
= Key Features =
* **SMTPKeepAlive Support**: Maintains persistent SMTP connections for batch sending
* **Batch Processing**: Sends multiple emails per connection, dramatically improving performance
* **Automatic Configuration**: Uses existing ROBOTSTXT SMTP settings
* **Database Queue**: Persistent email queue survives server restarts and crashes
* **External Workers**: CLI worker script for asynchronous processing independent of WordPress cron
* **Parallel Processing**: Run multiple workers simultaneously for high-volume campaigns
* **Automatic Retry**: Failed emails retry up to 3 times with exponential backoff
* **Real-Time Statistics**: Monitor queue status and campaign performance
* **Campaign Metrics**: Track speed, duration, success rate for each campaign
* **Amazon SES Support**: Native integration with Amazon SES API
* **Rate Limiting**: Integrates with ROBOTSTXT SMTP rate limiting system
* **Zero Configuration**: Works out of the box with Newsletter plugin
* **Rate Limiting**: Respects ROBOTSTXT SMTP rate limits
* **Scalable**: Handle campaigns of any size with parallel workers
= Performance Improvement =
= Architecture =
**Without this plugin:**
* Each email requires: Connect → Authenticate → Send → Disconnect
* 10,000 emails = 8-10 hours
**Version 2.2.0 introduces a queue-based architecture:**
**With this plugin:**
* One connection for multiple emails using SMTPKeepAlive
* 10,000 emails = 35 minutes (SMTP) or 20 minutes (Amazon SES)
* Newsletter campaigns are queued to database instead of sent immediately
* External worker processes pick up queued emails and send them via wp_mail()
* Statistics are tracked and preserved even after queue cleanup
* Multiple workers can run in parallel for high-volume sending
= Performance & Reliability =
**Reliability:**
* Emails persisted to database - no data loss on crashes
* Automatic retry with exponential backoff (5min → 15min → 30min)
* Stale lock recovery prevents stuck emails
**Scalability:**
* Support for 10+ parallel workers
* Process 10,000+ emails per hour with proper worker setup
* Campaign statistics track actual sending speed
**Monitoring:**
* Real-time queue status (pending, processing, sent, failed)
* Campaign metrics (start time, duration, speed, success rate)
* Detailed email queue view in admin
= Requirements =
* Newsletter plugin 9.0.0 or higher
* ROBOTSTXT SMTP plugin 1.2.0 or higher
* ROBOTSTXT SMTP plugin 2.0.0 or higher
* (Optional) ROBOTSTXT SMTP Amazon SES plugin 1.0.0 or higher
* CLI access for worker setup (cron or process supervisor)
= How It Works =
= Setup =
**Installation:**
1. Install and activate the plugin
2. Go to Newsletter → ROBOTSTXT SMTP
2. Go to Newsletter → SMTP (by ROBOTSTXT)
3. Enable integration and configure batch size
4. Newsletter will automatically use ROBOTSTXT SMTP for all bulk sends
The plugin intelligently detects whether you're using standard SMTP or Amazon SES and optimizes accordingly.
**Worker Setup (Required):**
Set up a cron job or process supervisor to run the worker:
`* * * * * php /path/to/wp-content/plugins/robotstxt-smtp-newsletter/worker.php 10 "w1"`
For parallel processing (10 workers):
`* * * * * seq 1 10 | xargs -P10 -I{} php /path/to/worker.php 10 "w{}"`
See Settings → SMTP → Queue Worker Configuration for detailed commands.
= Monitoring =
Access statistics via:
* **Newsletter → SMTP (by ROBOTSTXT)** - Queue status and recent campaigns
* **Newsletter → Email Queue** - View all queued and sent emails
* **Newsletter → Statistics** - Detailed campaign performance metrics
= Recommended Settings =