WP Offload SES 1.7 adds a new “Enqueue Only” mode that can be used to prevent sending accidental emails in development and staging environments or to temporarily pause all emails in production environments. This release also improves the management of sent emails, logs, and attachments, making it easier than ever for high-volume senders to maintain a lean and performant site over time.
⏸️ Enqueue Only Mode
When WP Offload SES is used in a development or staging environment, you may want to capture outbound emails in the database without sending them through Amazon SES. In production environments, there are times when temporarily pausing all emails may also be desired. All of this can be achieved through the new Enqueue Only setting.
Note: The Enqueue Only setting only takes effect when Send Mail Using SES is already enabled. Disabling Enqueue Only will cause queued emails to start sending. Therefore this setting should not be interpreted as a replacement for plugins such as Disable Emails which fully disable the wp_mail()
function.
Enabling Enqueue Only Mode via Code
The WPOSES_SETTINGS constant is available to developers who wish to configure the plugin via code. The following snippet can be added to wp-config.php
of a development or staging environment to enable “Enqueue Only” mode and prevent live emails from accidentally being sent through Amazon SES.
define( 'WPOSES_SETTINGS', serialize( array(
// Send site emails through the WP Offload SES plugin.
'send-via-ses' => true,
// Queue email in the local database, but do not send it.
// Only takes effect if 'send-via-ses' is also true.
'enqueue-only' => true,
) ) );
🎚️ Improvements for High-Volume Senders
Some sites send a lot of email and store millions of sent emails in the database, which leads to performance problems as the tables grow in size. These large tables eventually slow down the plugin settings, increase storage costs, and add extra complexity to backups and migrations.
For WordPress sites that send a large number of transactional emails, WP Offload SES 1.7 offers new abilities to automatically remove sent email logs or purge them on demand.
Remove After Send
The ability to delete email logs after a certain number of days has been a tried and true solution for WP Offload SES users to reduce database bloat over time.
WP Offload SES 1.7 introduces even more control over email logs with two new settings that make it possible to remove emails as soon as they have been successfully sent (or re-sent):
- Instantly Remove Successfully Sent Emails From The Log
- Remove Successfully Re-sent Failed Emails From The Log
Instantly removing email logs is intended for high-volume senders who wish to prioritize database performance over long-term storage of successfully sent emails while maintaining the ability to monitor failures.
Note: Removing sent emails means that open and click tracking data for those emails will also be removed and therefore unavailable for reporting.
Purge Logs
The new Purge Logs functionality allows site owners who already have a large number of emails in their database to remove all emails or only those with a specific status.
- ⚡ All (Fast) – Quickly purges all emails by truncating the relevant database tables and deleting email attachments
- ✅ Sent – Purges successfully sent emails
- ⚠️ Cancelled – Purges cancelled emails that were manually cancelled before being sent
- 🚨 Failed – Purges failed emails that could not be sent
- ⏳ Queued – Purges queued emails that are waiting to be sent
- ⌛ Not Queued – Purges all sent, cancelled, and failed emails, leaving only queued emails that have yet to be sent
💨 Performance Improvements
WP Offload SES 1.7 also brings performance improvements to the Reports, Activity, and Settings tabs. Sites with a large number of emails no longer have to wait for resource-intensive queries to run before accessing the plugin settings. In version 1.7, data for the Reports and Activity tabs is now loaded asynchronously, ensuring that plugin settings remain easily accessible even for high-volume senders.
And More
As always, there’s a few other changes in the new release, including an update to the required version of PHP, better handling of URLs that are already URL-encoded, and other bits and bobs. For a full list of new features, improvements, and bug fixes, see the WP Offload SES 1.7 Changelog.
We’d love to hear your thoughts on this release. Let us know on Twitter or in the comments below.