This commit is contained in:
Javier Casares 2026-02-09 12:00:11 +00:00
commit 0a42e00299
5 changed files with 34 additions and 58 deletions

View file

@ -1,3 +1,9 @@
= 2.1.0 =
* Changed uninstall behavior: plugin no longer performs cleanup on uninstall, all data cleanup is now handled by the core SMTP plugin.
* This ensures Newsletter configuration is preserved when only the add-on is removed, and properly cleaned when the core plugin is uninstalled.
* Simplified uninstall.php to delegate all cleanup responsibility to core SMTP plugin.
= 2.0.1 =
* Removed Network requirement from plugin headers to allow single-site activation.

View file

@ -2,9 +2,9 @@
Contributors: robotstxt
Tags: newsletter, smtp, email, bulk, amazonses
Requires at least: 4.7
Tested up to: 6.7
Tested up to: 6.9
Requires PHP: 7.2
Stable tag: 1.0.0
Stable tag: 2.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

View file

@ -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 SMTPKeepAlive support.
* Version: 2.0.1
* Version: 2.1.0
* 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.0.1' );
define( 'ROBOTSTXT_SMTP_NEWSLETTER_VERSION', '2.1.0' );
define( 'ROBOTSTXT_SMTP_NEWSLETTER_FILE', __FILE__ );
define( 'ROBOTSTXT_SMTP_NEWSLETTER_PATH', plugin_dir_path( __FILE__ ) );
define( 'ROBOTSTXT_SMTP_NEWSLETTER_URL', plugin_dir_url( __FILE__ ) );

View file

@ -2,8 +2,13 @@
/**
* Uninstall script for Newsletter - SMTP (by ROBOTSTXT).
*
* This file is called when the plugin is deleted via WordPress admin.
* It removes all plugin data from the database.
* This add-on does not perform any cleanup on uninstall. All data cleanup
* (including Newsletter plugin options) is handled by the core SMTP plugin
* when it is uninstalled.
*
* This ensures that:
* - If only the Newsletter add-on is removed, the configuration remains intact
* - If the core SMTP plugin is removed, all data (including add-on data) is cleaned up
*
* @package ROBOTSTXT_SMTP_Newsletter
*/
@ -13,52 +18,4 @@ if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
exit;
}
/**
* Delete plugin options and transients.
*
* @param int $site_id Site ID (for multisite).
* @return void
*/
function robotstxt_smtp_newsletter_delete_site_data( $site_id = null ) {
// Switch to site if multisite.
if ( is_multisite() && $site_id ) {
switch_to_blog( $site_id );
}
// Delete plugin options.
delete_option( 'robotstxt_smtp_newsletter_options' );
// Delete updater cache transients.
$plugin_basename = 'robotstxt-smtp-newsletter/robotstxt-smtp-newsletter.php';
$cache_key = 'robotstxt_updater_' . md5( $plugin_basename );
delete_site_transient( $cache_key );
// Restore current blog if multisite.
if ( is_multisite() && $site_id ) {
restore_current_blog();
}
}
// Single site installation.
if ( ! is_multisite() ) {
robotstxt_smtp_newsletter_delete_site_data();
} else {
// Multisite installation.
global $wpdb;
// Get all blog IDs.
$blog_ids = $wpdb->get_col( "SELECT blog_id FROM {$wpdb->blogs}" );
// Delete data for each site.
foreach ( $blog_ids as $blog_id ) {
robotstxt_smtp_newsletter_delete_site_data( $blog_id );
}
// Delete network-wide updater cache.
$plugin_basename = 'robotstxt-smtp-newsletter/robotstxt-smtp-newsletter.php';
$cache_key = 'robotstxt_updater_' . md5( $plugin_basename );
delete_site_transient( $cache_key );
}
// Clear WordPress update cache to remove our plugin from the list.
delete_site_transient( 'update_plugins' );
// No cleanup needed - handled by core SMTP plugin uninstall.

View file

@ -1,13 +1,26 @@
{
"name": "Newsletter - SMTP (by ROBOTSTXT)",
"slug": "robotstxt-smtp-newsletter",
"version": "2.0.1",
"version": "2.1.0",
"author": "ROBOTSTXT",
"homepage": "https://git.robotstxt.es/ROBOTSTXT/robotstxt-smtp-newsletter",
"download_url": "https://git.robotstxt.es/ROBOTSTXT/robotstxt-smtp-newsletter/releases/download/2.0.1/robotstxt-smtp-newsletter-2.0.1.zip",
"download_url": "https://git.robotstxt.es/ROBOTSTXT/robotstxt-smtp-newsletter/releases/download/2.1.0/robotstxt-smtp-newsletter-2.1.0.zip",
"requires": "4.7",
"tested": "6.9",
"requires_php": "7.2",
"last_updated": "2026-02-09",
"description": "Integrates ROBOTSTXT SMTP configuration with Newsletter plugin for efficient bulk email delivery with SMTPKeepAlive support. Achieves 20-30x faster bulk sending compared to standard wp_mail().",
"changelog": "<h4>2.0.1 - 2026-01-29</h4><ul><li><strong>Changed:</strong> Removed Network requirement from plugin headers to allow single-site activation</li></ul><h4>2.0.0 - 2026-01-29</h4><ul><li><strong>Changed:</strong> Updated compatibility with SMTP (by ROBOTSTXT) plugin 2.0.0</li><li><strong>Changed:</strong> Enhanced integration with core SMTP plugin security improvements</li><li><strong>Improved:</strong> Better error handling and validation</li><li><strong>Improved:</strong> Code quality improvements</li></ul><h4>1.0.0 - 2026-01-29</h4><ul><li><strong>Added:</strong> Initial release</li><li><strong>Added:</strong> SMTPKeepAlive support for efficient SMTP batch sending</li><li><strong>Added:</strong> Amazon SES API integration for optimized delivery</li><li><strong>Added:</strong> Dynamic speed calculation from SMTP rate limits (up to 32,400 emails/hour)</li><li><strong>Added:</strong> Batch processing with configurable batch size (up to 2,610 emails per chunk)</li><li><strong>Added:</strong> Automatic FROM address configuration from ROBOTSTXT SMTP</li><li><strong>Added:</strong> HELO hostname configuration for multisite compatibility</li><li><strong>Added:</strong> Resilient error handling - continues sending even if individual recipients fail</li><li><strong>Added:</strong> WP-CLI compatibility for cron execution</li><li><strong>Performance:</strong> 20-30x faster bulk email sending compared to standard wp_mail()</li><li><strong>Performance:</strong> Sends 22 emails in ~7 seconds using SMTPKeepAlive</li></ul>"
"changelog": "<h4>2.1.0 - 2026-02-09</h4><ul><li><strong>Changed:</strong> Uninstall behavior: plugin no longer performs cleanup on uninstall, all data cleanup is now handled by the core SMTP plugin</li><li><strong>Changed:</strong> This ensures Newsletter configuration is preserved when only the add-on is removed, and properly cleaned when the core plugin is uninstalled</li><li><strong>Technical:</strong> Simplified uninstall.php to delegate all cleanup responsibility to core SMTP plugin</li><li><strong>Technical:</strong> Improved data preservation and cleanup consistency across the plugin ecosystem</li></ul><h4>2.0.1 - 2026-01-29</h4><ul><li><strong>Changed:</strong> Removed Network requirement from plugin headers to allow single-site activation</li></ul><h4>2.0.0 - 2026-01-29</h4><ul><li><strong>Changed:</strong> Updated compatibility with SMTP (by ROBOTSTXT) plugin 2.0.0</li><li><strong>Changed:</strong> Enhanced integration with core SMTP plugin security improvements</li><li><strong>Improved:</strong> Better error handling and validation</li><li><strong>Improved:</strong> Code quality improvements</li></ul><h4>1.0.0 - 2026-01-29</h4><ul><li><strong>Added:</strong> Initial release</li><li><strong>Added:</strong> SMTPKeepAlive support for efficient SMTP batch sending</li><li><strong>Added:</strong> Amazon SES API integration for optimized delivery</li><li><strong>Added:</strong> Dynamic speed calculation from SMTP rate limits (up to 32,400 emails/hour)</li><li><strong>Added:</strong> Batch processing with configurable batch size (up to 2,610 emails per chunk)</li><li><strong>Added:</strong> Automatic FROM address configuration from ROBOTSTXT SMTP</li><li><strong>Added:</strong> HELO hostname configuration for multisite compatibility</li><li><strong>Added:</strong> Resilient error handling - continues sending even if individual recipients fail</li><li><strong>Added:</strong> WP-CLI compatibility for cron execution</li><li><strong>Performance:</strong> 20-30x faster bulk email sending compared to standard wp_mail()</li><li><strong>Performance:</strong> Sends 22 emails in ~7 seconds using SMTPKeepAlive</li></ul>",
"sections": {
"description": "Integrates ROBOTSTXT SMTP configuration with Newsletter plugin for efficient bulk email delivery with SMTPKeepAlive support. Achieves 20-30x faster bulk sending compared to standard wp_mail().",
"changelog": "<h4>2.1.0 - 2026-02-09</h4><ul><li><strong>Changed:</strong> Uninstall behavior: plugin no longer performs cleanup on uninstall, all data cleanup is now handled by the core SMTP plugin</li><li><strong>Changed:</strong> This ensures Newsletter configuration is preserved when only the add-on is removed, and properly cleaned when the core plugin is uninstalled</li><li><strong>Technical:</strong> Simplified uninstall.php to delegate all cleanup responsibility to core SMTP plugin</li><li><strong>Technical:</strong> Improved data preservation and cleanup consistency across the plugin ecosystem</li></ul><h4>2.0.1 - 2026-01-29</h4><ul><li><strong>Changed:</strong> Removed Network requirement from plugin headers to allow single-site activation</li></ul><h4>2.0.0 - 2026-01-29</h4><ul><li><strong>Changed:</strong> Updated compatibility with SMTP (by ROBOTSTXT) plugin 2.0.0</li><li><strong>Changed:</strong> Enhanced integration with core SMTP plugin security improvements</li><li><strong>Improved:</strong> Better error handling and validation</li><li><strong>Improved:</strong> Code quality improvements</li></ul><h4>1.0.0 - 2026-01-29</h4><ul><li><strong>Added:</strong> Initial release</li><li><strong>Added:</strong> SMTPKeepAlive support for efficient SMTP batch sending</li><li><strong>Added:</strong> Amazon SES API integration for optimized delivery</li><li><strong>Added:</strong> Dynamic speed calculation from SMTP rate limits (up to 32,400 emails/hour)</li><li><strong>Added:</strong> Batch processing with configurable batch size (up to 2,610 emails per chunk)</li><li><strong>Added:</strong> Automatic FROM address configuration from ROBOTSTXT SMTP</li><li><strong>Added:</strong> HELO hostname configuration for multisite compatibility</li><li><strong>Added:</strong> Resilient error handling - continues sending even if individual recipients fail</li><li><strong>Added:</strong> WP-CLI compatibility for cron execution</li><li><strong>Performance:</strong> 20-30x faster bulk email sending compared to standard wp_mail()</li><li><strong>Performance:</strong> Sends 22 emails in ~7 seconds using SMTPKeepAlive</li></ul>"
},
"banners": {
"low": "",
"high": ""
},
"icons": {
"1x": "",
"2x": ""
}
}