If you need to log site emails but require more control over what data is being logged and how long that data is being stored, WP Mail Logging is a solid plugin that can be installed.
After you have installed and activated the plugin, it will add a new admin menu called;
WP Mail Logging
To view logged email, you can view those from;
WP Mail Logging > WP Mail Logging
The plugin setting can be found from;
WP Mail Logging > Settings > General Settings
Manage all your WordPress sites with the MainWP Dashboard
WordPress Management for Professionals
Are you ready to go Pro?
All MainWP Pro Extensions are available through one of our convenient bundled packages.
By default, on plugin deactivation and uninstall, the data will not be removed from the site database. However, it can be enabled, as well as providing options to enable logging cleanup, or to set automatic cleanup time.
You can also export out the defined new settings to be imported on other sites where the plugin will be used on the import and export settings. This can be found from;
WP Mail Logging > Import / Export
Useful default for the WP Mail Logging plugin settings can be found in this gist, which can then be imported on your sites where the plugin is installed.
The plugin creates a custom database table, where logged email entries are stored. This table is named;
If you have the option enabled in the plugin settings to delete all plugin data, the custom database table created will be automatically removed when the plugin is deleted.
There will be cases where you will want to log site emails. These may include:
- If it is on a staging or development site
- For checking what site emails are being sent
- If you are using an SMTP plugin or transactional email provider plugin which does not log site emails sent.
Being able to log site emails will allow you to see what emails are being sent on your child site, it will help debug email sending issues or if you are already using a transactional email provider with a plugin that does not log email this will help.