How to Set Up Email Logging

Would you like to keep records of every email that’s sent out from your WordPress site? With WP Mail SMTP, you can easily enable email logging. Plus, you can quickly see if any emails were not sent successfully.

In this tutorial, we’ll show you how to enable and use email logs in WP Mail SMTP.

  1. Configuring Email Logging
  2. Viewing Email Logs

1. Configuring Email Logging

Before we get started, be sure to install and activate WP Mail SMTP on your WordPress site.

Once the plugin is active, you’ll need to go to WP Mail SMTP » Settings. Then, click on the Email Log tab.

Open Email Log settings in WP Mail SMTP

After you’ve opened the Email Log page, you’ll see all available settings for your email logs.

Email logging options in WP Mail SMTP

Enable Log

The Enable Log setting will turn on email logging for your site once this option is checked.

After enabling this option, a record will be made of every future email sent out from your website. Details for each email record will include:

  • Email status (whether the email was sent successfully)
  • Date and time sent
  • Subject line
  • Recipient email address(es), including CC and BCC
  • From email
  • Number of attachments
  • Mailer options used
  • Additional technical details (such as content-type, MIME, etc)

Log Email Content

If you decide to enable email logs, you’ll see an additional checkbox appear labeled Log Email Content. When this box is checked, your email logs will also include the actual content of emails sent out from your site.

Note: Please consider carefully before enabling email content logging. Email content may include sensitive information, such as user logins. By enabling this option, all email content will be stored as plain text (not encrypted) in your site’s database.

Log Retention Period

The log retention period setting allows you to choose how long to store your logs within your site. By default, this setting will be set to Forever, but you can change this to however long you’d like.

Viewing Email Logs

To view your email logs, click on WP Mail SMTP » Email Log in the WordPress admin menu.

This will take you to the main log page, which will display all logged emails. By default, the newest logs will be shown at the top of the list.

Email log in WP Mail SMTP

To see more details for a specific entry, you can click on the Subject for any log. This will open up a page for the individual email log.

Individual email log page in WP Mail SMTP

2. Viewing Log Email Content

If you’d like to view the logged email’s content, click the View Email button under the entry you’d like to see.

View Email in Email Log

This will open an overlay containing the content of the email body.

Email Preview in Email Log

That’s it! You can now set up email logging for your WordPress site using WP Mail SMTP.

Next, would you like to know how to set up a mailer in WP Mail SMTP? Be sure to check out our complete guide to WP Mail SMTP mailers for help deciding which mailer is likely to be the best fit for your site.