- php 10 "w1"
+ php "w1"
- seq 1 10 | xargs -P10 -I{} php 10 "w{}"
+ seq 1 10 | xargs -P10 -I{} php "w{}"
diff --git a/changelog.txt b/changelog.txt
index 8cecb95..7db1410 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,9 +1,18 @@
+= 2.2.8 =
+
+* CHANGED: Batch Size is now read from the plugin settings database — workers no longer require it as a command-line argument
+* CHANGED: Worker command simplified: php worker.php "w1" (batch_size argument removed)
+* IMPROVED: Batch Size field now shows a throughput table (10 workers × N emails = simultaneous emails)
+* IMPROVED: Worker section in settings shows the calculated simultaneous email count based on current settings
+* TECHNICAL: Legacy command format (php worker.php 10 "w1") still accepted with a deprecation warning
+
= 2.2.7 =
* IMPROVED: Worker now runs as a continuous loop, draining the queue completely before exiting
* IMPROVED: Statistics are synced after each batch (not only at the end)
* IMPROVED: Worker output includes worker ID on each line for clearer parallel logs
* FIXED: Uneven work distribution between parallel workers
+* INVESTIGATING: Possible incompatibility with the Redirection plugin in MultiSite environments - output buffering mitigates known symptoms while investigation is ongoing
= 2.2.6 =
diff --git a/readme.txt b/readme.txt
index ce00668..c068872 100644
--- a/readme.txt
+++ b/readme.txt
@@ -4,7 +4,7 @@ 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.2.7
+Stable tag: 2.2.8
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -70,15 +70,17 @@ SMTP (by ROBOTSTXT) Newsletter connects your Newsletter plugin with ROBOTSTXT SM
Set up a cron job or process supervisor to run the worker:
Single worker:
-`* * * * * php /path/to/wp-content/plugins/robotstxt-smtp-newsletter/worker.php 10 "w1"`
+`* * * * * php /path/to/wp-content/plugins/robotstxt-smtp-newsletter/worker.php "w1"`
Parallel processing (10 workers):
-`* * * * * seq 1 10 | xargs -P10 -I{} php /path/to/worker.php 10 "w{}"`
+`* * * * * seq 1 10 | xargs -P10 -I{} php /path/to/worker.php "w{}"`
+
+Workers read the Batch Size directly from the plugin settings database. With 10 parallel workers each picking up N emails, the total simultaneous throughput is 10 × N emails.
**For WordPress MultiSite:**
Workers require the --url parameter to specify which site to process:
-`* * * * * php /path/to/worker.php 10 "w1" --url="https://site.example.com"`
+`* * * * * php /path/to/worker.php "w1" --url="https://site.example.com"`
See Settings → SMTP → Queue Worker Configuration for detailed commands tailored to your installation.
@@ -139,8 +141,19 @@ In typical scenarios, you'll see 20-30x performance improvement. For example:
Yes. The plugin integrates with ROBOTSTXT SMTP rate limiting system to ensure you don't exceed your provider's limits.
+= Is the Redirection plugin compatible? =
+
+A possible incompatibility with the Redirection plugin is currently under investigation. When Redirection is active in a MultiSite environment, it may issue HTTP redirect headers during WordPress initialization, which can interfere with CLI worker processes. The worker uses output buffering to mitigate known symptoms. If you experience issues with the worker on a site running the Redirection plugin, please report them at the support link below.
+
== Changelog ==
+= 2.2.8 =
+* CHANGED: Batch Size is now read from plugin settings database — no longer passed as a command-line argument to the worker
+* CHANGED: Worker command simplified to: php worker.php "w1" (no batch_size argument needed)
+* IMPROVED: Batch Size field shows a throughput table: 10 workers × N emails = simultaneous emails
+* IMPROVED: Worker section displays the current calculated simultaneous email count
+* TECHNICAL: Legacy format (php worker.php 10 "w1") still supported with a deprecation warning
+
= 2.2.7 =
* IMPROVED: Worker now runs as a continuous loop, draining the queue completely before exiting
* IMPROVED: Statistics are synced after each batch
diff --git a/robotstxt-smtp-newsletter.php b/robotstxt-smtp-newsletter.php
index 1169fd8..2a0ea4b 100644
--- a/robotstxt-smtp-newsletter.php
+++ b/robotstxt-smtp-newsletter.php
@@ -3,7 +3,7 @@
* Plugin Name: Newsletter - SMTP (by ROBOTSTXT)
* Plugin URI: https://git.robotstxt.es/ROBOTSTXT/robotstxt-smtp-newsletter
* Description: Integrates ROBOTSTXT SMTP configuration with Newsletter plugin for efficient bulk email delivery with database-backed queue and external workers.
- * Version: 2.2.7
+ * Version: 2.2.8
* Requires at least: 4.7
* Requires PHP: 7.2
* Security: robotstxt@robotstxt.es
@@ -25,7 +25,7 @@ if ( ! defined( 'ABSPATH' ) ) {
}
// Plugin constants.
-define( 'ROBOTSTXT_SMTP_NEWSLETTER_VERSION', '2.2.7' );
+define( 'ROBOTSTXT_SMTP_NEWSLETTER_VERSION', '2.2.8' );
define( 'ROBOTSTXT_SMTP_NEWSLETTER_FILE', __FILE__ );
define( 'ROBOTSTXT_SMTP_NEWSLETTER_PATH', plugin_dir_path( __FILE__ ) );
define( 'ROBOTSTXT_SMTP_NEWSLETTER_URL', plugin_dir_url( __FILE__ ) );
diff --git a/update.json b/update.json
index 1ef8fbc..7fc4501 100644
--- a/update.json
+++ b/update.json
@@ -1,19 +1,19 @@
{
"name": "Newsletter - SMTP (by ROBOTSTXT)",
"slug": "robotstxt-smtp-newsletter",
- "version": "2.2.7",
+ "version": "2.2.8",
"author": "ROBOTSTXT",
"homepage": "https://git.robotstxt.es/ROBOTSTXT/robotstxt-smtp-newsletter",
- "download_url": "https://git.robotstxt.es/ROBOTSTXT/robotstxt-smtp-newsletter/releases/download/2.2.7/robotstxt-smtp-newsletter-2.2.7.zip",
+ "download_url": "https://git.robotstxt.es/ROBOTSTXT/robotstxt-smtp-newsletter/releases/download/2.2.8/robotstxt-smtp-newsletter-2.2.8.zip",
"requires": "4.7",
"tested": "6.9",
"requires_php": "7.2",
"last_updated": "2026-02-18",
- "description": "Integrates ROBOTSTXT SMTP configuration with Newsletter plugin for reliable bulk email delivery with database-backed queue and external workers. Workers now run as continuous loops draining the full queue, with balanced distribution across parallel workers.",
- "changelog": "
2.2.7 - 2026-02-18
Improved: Worker now runs as a continuous loop, draining the queue completely before exiting
Improved: Statistics are synced after each batch
Improved: Worker output includes worker ID on each line for clearer parallel logs
Fixed: Uneven work distribution between parallel workers
2.2.6 - 2026-02-16
CRITICAL: Worker now suppresses plugin header warnings in MultiSite environments
CRITICAL: Fixed Newsletter base class dependencies not loading in DOING_CRON context
CRITICAL: Worker now manually initializes plugin when newsletter_loaded hook doesn't fire
CRITICAL: Fixed MultiSite subdirectory site detection - worker correctly loads site from --url path
CRITICAL: Removed WP_CLI constant - caused fatal errors with multisite-clone-duplicator and similar plugins
Fixed: Headers already sent warnings from Redirection plugin and other plugins during WordPress init
Improved: Worker loads NewsletterAddon and NewsletterMailerAddon before plugin
Improved: Worker calls Plugin::instance_init() manually for proper initialization
Improved: REQUEST_URI parsed from URL path for correct MultiSite site selection
Technical: Output buffering prevents header-related warnings from breaking worker execution
2.2.5 - 2026-02-16
CRITICAL: Worker now loads plugin manually in DOING_CRON context
Fixed: Newsletter SMTP plugin is not active error in worker script
Improved: Worker compatibility with all WordPress environments including MultiSite
Technical: Worker attempts to load plugin file directly if not already loaded via hooks
2.2.4 - 2026-02-16
CRITICAL: Speed calculation now uses actual NEWSLETTER_CRON_INTERVAL value
Fixed: Batch_size was being divided by 5 due to incorrect cron interval assumption
Improved: Plugin now dynamically calculates speed based on actual Newsletter cron interval
Technical: Loads Newsletter's cron.php to detect actual interval, supports any cron interval without hardcoded assumptions
2.2.3 - 2026-02-16
CRITICAL: Overridden get_emails_per_run() to bypass Newsletter's internal calculation
Fixed: Newsletter was calculating batch = speed / 12, resulting in only 8-16 emails per execution
Fixed: Plugin now directly returns configured batch_size for proper queue loading
Technical: Added get_emails_per_run() override in Plugin class
2.2.2 - 2026-02-16
Fixed: Newsletter now correctly respects configured batch_size when enqueuing emails
Fixed: Emails are now enqueued all at once to database instead of gradually
Improved: Added public $batch property that Newsletter reads directly
Improved: Added get_batch_size() method for Newsletter compatibility
Technical: Mailers expose batch_size through multiple interfaces for Newsletter compatibility
2.2.1 - 2026-02-16
Added: MultiSite detection in settings page with tailored worker commands
Added: Worker script now supports --url parameter for MultiSite environments
BREAKING: System cron or process supervisor required for production use
Technical: New database tables for queue and statistics with automatic creation on activation
Technical: Microsecond precision timestamps for accurate performance metrics
Security: CLI-only worker script with SQL injection prevention and capability checks
2.1.0 - 2026-02-09
Changed: Uninstall behavior: plugin no longer performs cleanup on uninstall, all data cleanup is now handled by the core SMTP plugin
Changed: This ensures Newsletter configuration is preserved when only the add-on is removed, and properly cleaned when the core plugin is uninstalled
Technical: Simplified uninstall.php to delegate all cleanup responsibility to core SMTP plugin
2.0.1 - 2026-01-29
Changed: Removed Network requirement from plugin headers to allow single-site activation
2.0.0 - 2026-01-29
Changed: Updated compatibility with SMTP (by ROBOTSTXT) plugin 2.0.0
Changed: Enhanced integration with core SMTP plugin security improvements
Improved: Better error handling and validation
1.0.0 - 2026-01-29
Added: Initial release with SMTPKeepAlive support
Added: Amazon SES API integration for optimized delivery
Performance: 20-30x faster bulk email sending compared to standard wp_mail()
",
+ "description": "Integrates ROBOTSTXT SMTP configuration with Newsletter plugin for reliable bulk email delivery with database-backed queue and external workers. Batch size is configured in settings and read automatically by workers — no command-line argument needed.",
+ "changelog": "
2.2.8 - 2026-02-18
Changed: Batch Size is now read from the plugin settings database — workers no longer require it as a command-line argument
BREAKING: System cron or process supervisor required for production use
Technical: New database tables for queue and statistics with automatic creation on activation
Technical: Microsecond precision timestamps for accurate performance metrics
Security: CLI-only worker script with SQL injection prevention and capability checks
2.1.0 - 2026-02-09
Changed: Uninstall behavior: plugin no longer performs cleanup on uninstall, all data cleanup is now handled by the core SMTP plugin
Changed: This ensures Newsletter configuration is preserved when only the add-on is removed, and properly cleaned when the core plugin is uninstalled
Technical: Simplified uninstall.php to delegate all cleanup responsibility to core SMTP plugin
2.0.1 - 2026-01-29
Changed: Removed Network requirement from plugin headers to allow single-site activation
2.0.0 - 2026-01-29
Changed: Updated compatibility with SMTP (by ROBOTSTXT) plugin 2.0.0
Changed: Enhanced integration with core SMTP plugin security improvements
Improved: Better error handling and validation
1.0.0 - 2026-01-29
Added: Initial release with SMTPKeepAlive support
Added: Amazon SES API integration for optimized delivery
Performance: 20-30x faster bulk email sending compared to standard wp_mail()
",
"sections": {
"description": "Integrates ROBOTSTXT SMTP configuration with Newsletter plugin for reliable bulk email delivery with database-backed queue and external workers. Workers now run as continuous loops draining the full queue, with balanced distribution across parallel workers.",
- "changelog": "
2.2.7 - 2026-02-18
Improved: Worker now runs as a continuous loop, draining the queue completely
Fixed: Uneven work distribution between parallel workers
2.2.6 - 2026-02-16
CRITICAL: Fixed header warnings in MultiSite with Redirection plugin
CRITICAL: Fixed Newsletter class dependencies in DOING_CRON context
CRITICAL: Worker manually initializes plugin when hooks don't fire
CRITICAL: Fixed MultiSite subdirectory site detection via --url path
CRITICAL: Removed WP_CLI constant causing fatal errors with some plugins