### [[SOLVED] How to Fix Wordfence Not Sending Email](https://wpmailsmtp.com/fix-wordfence-not-sending-email/)

**Published:** March 8, 2021
**Author:** Claire Broadley

**Excerpt:** Are your Wordfence security notifications not being delivered? Using the default WordPress email sending protocol can lead to missing important emails. In this tutorial, we show you how to use WP Mail SMTP to fix your Wordfence email delivery issues.

**Content:**

Is Wordfence not sending email from your website? Many users miss out on important alerts because these messages never make it to their inbox.

If you aren’t getting the right alerts, you might already be locked out of your site with no way to access it. This can be a problem, especially if you’re counting on those alerts to keep your site safe.

In this guide, I’ll walk you through clear steps to fix the problem, so you can start receiving Wordfence emails again without any trouble.

[Fix Your WordPress Emails Now](https://wpmailsmtp.com/pricing/)

- [Does Wordfence work with email logs for troubleshooting?](#aioseo-which-smtp-plugin-works-best-with-wordfence-emails)
- [1. Send a Wordfence Test Email](#test)
    - [How often does Wordfence send scan or login alerts by email?](#aioseo-which-smtp-plugin-works-best-with-wordfence-emails)
- [2. Fix Wordfence Emails Not Sending With SMTP](#smtp)
- [3. Customize Email Alerts in Wordfence](#alerts)
- [4. Control Other WordPress Alert Emails](#wordpress)

### Is Wordfence Not Sending Unlock Email?

If Wordfence is not sending lockout emails, temporarily rename the Wordfence plugin directory to get back into WordPress. This will unlock your account.

After that, reinstall Wordfence and follow the steps below to [send your Wordfence emails through SMTP](#smtp). This will improve your email deliverability and stop the same thing from happening next time.

## How to Fix Wordfence Not Sending Email

First, let’s send a basic test email to see if `wp_mail()` is working. This will allow us to see if your web host is set up to send emails from your site, which is an important troubleshooting step.

### 1. Send a Wordfence Test Email

To test your email alerts, click **Wordfence » Tools** in the WordPress dashboard.

![Wordfence tools menu](https://wpmailsmtp.com/wp-content/uploads/2021/02/wordfence-tools-settings.png)From the Live Traffic screen, click the **Diagnostics** tab.

![Check diagnostics if Wordfence not sending email](https://wpmailsmtp.com/wp-content/uploads/2021/02/wordfence-diagnostics-email.png)Next, scroll all the way down to the bottom and expand the **Other Tests** section. You’ll see 2 different ways to test your Wordfence emails:

- Send a test email from this WordPress server to an email address
- Send a test activity report email

![Test Wordfence not sending email](https://wpmailsmtp.com/wp-content/uploads/2021/02/wordfence-email-test.png "Test Wordfence not sending email")Let’s use the first option, **Send a test email from this WordPress server**. Type in your email address and press the **Send Test Email** button.

After triggering the email alert, Wordfence will show a result of **True** or **False.**

![Test result: Wordfence not sending email](https://wpmailsmtp.com/wp-content/uploads/2021/02/wordfence-email-test-result.png "Test result: Wordfence not sending email")This alert only tells you whether the `wp_mail()` function *generated* the email. So it will confirm that your server is set up to send an email, but it can’t tell you what happens after that.

In WordPress, `wp_mail()` is a basic way of sending emails. It doesn’t authenticate the messages. So when these emails are received by other email servers, they might discard the emails or mark them as spam.

That’s likely why you’re seeing a successful test result, but Wordfence emails aren’t being delivered. To get much more detailed email logs, let’s use WP Mail SMTP to send emails instead.

### 2. Fix Wordfence Emails Not Sending With SMTP

WP Mail SMTP makes it easy to fix Wordfence not sending email. It takes over the `wp_mail()` function and sends emails via an external mailer service like [SendLayer](https://sendlayer.com), [Brevo](https://wpmailsmtp.com/go/brevo/ "Brevo(Formerly Sendinblue)") (formerly Sendinblue), or [SMTP.com](https://wpmailsmtp.com/go/smtp/ "SMTP.com") instead.

When you send through a mailing service, every email will have the correct authentication. That’s what helps your emails to get through spam filters.

![WP Mail SMTP Email Deliverability illustration](https://wpmailsmtp.com/wp-content/uploads/2020/05/WP-Mail-SMTP-infographic.png "WP Mail SMTP Email Deliverability Illustration")Once you set up WP Mail SMTP, all of your WordPress emails will be sent through the mailer you choose during setup.

It’s a great way to make sure you never miss a security alert, contact form message, or important lockout email.

We’ll show you how to set up WP Mail SMTP now.

##### Need a hand?

If you’d rather have someone else set up WP Mail SMTP for you, a full White Glove Setup service is included with the [Elite license](https://wpmailsmtp.com/pricing/).

#### Install the WP Mail SMTP Plugin

To start, let’s download the plugin zip file from your [WP Mail SMTP account](https://wpmailsmtp.com/account/). You’ll find it in the **Downloads** tab.

![Download WP Mail SMTP to fix WPForms contact form not sending email](https://wpmailsmtp.com/wp-content/uploads/2021/02/download-wp-mail-smtp-e1612521494497.png)Next, open up the WordPress dashboard and upload the plugin to your WordPress site. If you need help with this, jump over to this [guide to installing a WordPress plugin](https://www.wpbeginner.com/beginners-guide/step-by-step-guide-to-install-a-wordpress-plugin-for-beginners/).

![Install WP Mail SMTP](https://wpmailsmtp.com/wp-content/uploads/2021/02/install-wp-mail-smtp.png)Don’t forget to activate the plugin. As soon as you do that, you’ll see the Setup Wizard open up in your browser.

#### Set Up Your Mailer

Now let’s choose a mailing service to fix Wordfence not sending emails. To start, click the **Let’s Get Started** button on the first page of the wizard.

![Start the WP Mail SMTP setup wizard to fix WPforms not sending email](https://wpmailsmtp.com/wp-content/uploads/2021/02/wp-mail-smtp-setup-wizard.png)Now it’s time to choose your mailer. We recommend [SendLayer](https://sendlayer.com), [SMTP.com](https://wpmailsmtp.com/go/smtp/ "SMTP.com"), or [Brevo](https://wpmailsmtp.com/go/brevo/ "Brevo(Formerly Sendinblue)") because they’re reliable and easy to set up.

They’re also great for large sites that need to send a lot of emails. Check out this [complete guide to email providers](https://wpmailsmtp.com/docs/a-complete-guide-to-wp-mail-smtp-mailers/) if you’re not sure which one to use.

![Choose SMTP Mailer](https://wpmailsmtp.com/wp-content/uploads/2023/07/Choose-SMTP-Mailer.png "Choose SMTP Mailer")If you don’t want to use an external email service, you can use Other SMTP to send Wordfence emails through an SMTP server that you already have access to.

For example, you can use the SMTP server at your internet service provider. Keep in mind that some ISPs have limitations on the number of emails you can send.

Now you’ll want to switch over to the documentation for your chosen mailer to follow the setup steps. We have a detailed guide for each one:

- [SendLayer](https://wpmailsmtp.com/docs/how-to-set-up-the-sendlayer-mailer-in-wp-mail-smtp/)
- [SMTP.com](https://wpmailsmtp.com/docs/how-to-set-up-the-smtp-com-mailer-in-wp-mail-smtp/)
- [Brevo](https://wpmailsmtp.com/docs/how-to-set-up-the-sendinblue-mailer-in-wp-mail-smtp/)
- [Amazon SES](https://wpmailsmtp.com/docs/how-to-set-up-the-amazon-ses-mailer-in-wp-mail-smtp/)
- [Google Workspace / Gmail](https://wpmailsmtp.com/docs/how-to-set-up-the-gmail-mailer-in-wp-mail-smtp/)
- [Mailgun](https://wpmailsmtp.com/docs/how-to-set-up-the-mailgun-mailer-in-wp-mail-smtp/)
- [Microsoft 365 / Outlook.com](https://wpmailsmtp.com/docs/how-to-set-up-the-outlook-mailer-in-wp-mail-smtp/)
- [Postmark](https://wpmailsmtp.com/docs/how-to-set-up-the-postmark-mailer-in-wp-mail-smtp/)
- [SendGrid](https://wpmailsmtp.com/docs/how-to-set-up-the-sendgrid-mailer-in-wp-mail-smtp/)
- [SparkPost](https://wpmailsmtp.com/docs/how-to-set-up-the-sparkpost-mailer-in-wp-mail-smtp/)
- [Zoho Mail](https://wpmailsmtp.com/docs/how-to-set-up-the-zoho-mailer-in-wp-mail-smtp/)
- [Other SMTP](https://wpmailsmtp.com/docs/how-to-set-up-the-other-smtp-mailer-in-wp-mail-smtp/)

If you want to set up multiple mailers, you can do so in the [Additional Connections](https://wpmailsmtp.com/docs/configuring-additional-connections/) settings once you’ve finished the Setup Wizard.

Then you can select a [Backup Connection](https://wpmailsmtp.com/docs/configuring-backup-connection/) and configure [Smart Routing](https://wpmailsmtp.com/docs/setting-up-smart-email-routing/). Setting up your mailer will take just a few minutes. When you’ve set everything up, come back to this guide.

#### Turn on WordPress Email Logging (Optional)

At the end of the wizard, WP Mail SMTP will automatically turn on 2 recommended features:

- Improved Email Deliverability
- Email Error Tracking

![Enabling email logs and email alerts in the WP Mail SMTP Setup Wizard](https://wpmailsmtp.com/wp-content/uploads/2022/10/setup-wizard-enable-features.png)If you have a [paid license for WP Mail SMTP](https://wpmailsmtp.com/pricing/), you’ll also be able to turn on **Detailed Email Logs**. Email logging will track details of each email sent from WordPress, including:

- Email headers
- Subject line
- Date sent
- Status (sent or delivered)

![WP Mail SMTP Pro dashboard widget](https://wpmailsmtp.com/wp-content/uploads/2021/03/wp-mail-smtp-pro-dashboard-widget-confirmed.png)Enabling email logging lets you see the status of your sent emails in a dashboard widget. You can also view all of this information in **Complete Email Reports**, or see an overview in the **Weekly Email Summary**.

The other feature available here is **Instant Email Alerts**. These notifications let you know if your site [fails to send an email](https://wpmailsmtp.com/how-to-get-alerts-when-wordpress-emails-fail/).

![An email alert notification](https://wpmailsmtp.com/wp-content/uploads/2022/07/example-email-alert.png)That way you can quickly troubleshoot the issue. Finally, on the next screen, you’ll have the option to enable advanced email logging options.

![Configuring email log settings in the WP Mail SMTP Setup Wizard](https://wpmailsmtp.com/wp-content/uploads/2022/10/setup-wizard-email-log-settings.png)Here you can choose to save the content of all your email so you can [resend them](https://wpmailsmtp.com/wordpress-resend-new-user-email/) if needed. You can also export and print logs, track email opens and link clicks, save attachments, and more.

Check out our [guide to WordPress email logging](https://wpmailsmtp.com/log-emails-wordpress/) to find out how this works. OK, we’re almost done.

At the end of the wizard, paste in your license key. This will give you all of the updates and features in the Pro version of WP Mail SMTP.

![Enter WP Mail SMTP license key](https://wpmailsmtp.com/wp-content/uploads/2021/02/wp-mail-smtp-license-key.png)And that’s it! WP Mail SMTP will automatically send a test email to your account. If you want to send another test, you can do it manually at any time.

![Send test email from WP Mail SMTP](https://wpmailsmtp.com/wp-content/uploads/2021/02/elementor-test-email.png)Remember how the Wordfence email test only told us the email was sent? Now you have access to a much better email test. With WP Mail SMTP, you’ll see full information about the actual delivery status of the email as well.

Additionally, WP Mail SMTP has its own Domain Checker that will spot potential problems with your DNS and warn you about them.

![Deliverability should be improved warning message](https://wpmailsmtp.com/wp-content/uploads/2021/03/how-to-create-a-dmarc-record-sent-deliverability-improved.png)For example, here’s the message you’ll get if you have a missing [DMARC record](https://wpmailsmtp.com/how-to-create-dmarc-record/).

![WP Mail SMTP DMARC warning](https://wpmailsmtp.com/wp-content/uploads/2021/03/how-to-create-a-dmarc-record-sent-dmarc-warning-wpmailsmtp.png)Now we have your mailer set up, it’s time to choose which alerts you want to receive.

### 3. Customize Email Alerts in Wordfence

In this step, we’re going to check the email alerts that Wordfence is sending. It’s a good idea to review these settings if you’re not receiving email alerts (or you’re getting too many).

To do that, open up the **All Options** page again.

![All Options in Wordfence](https://wpmailsmtp.com/wp-content/uploads/2021/02/wordfence-options-settings.png)Let’s look at the **Email Alert Preferences** in the plugin.

![Wordfence email alert controls](https://wpmailsmtp.com/wp-content/uploads/2021/03/wordfence-email-alert-preference.png)Some of these email alerts are important. For example, you’ll want to know if anyone disables Wordfence, so **Email me if the Wordfence Web Application Firewall is turned off** should normally be checked.

But you might want to disable some of the alerts that are less important, particularly if you have several sites all sending alerts.

Using the dropdown, you can choose the level of scan results you want to receive. Here are some examples of alerts at each level. This isn’t a complete list, but it should give you an idea of what this setting does.

Scan Alert SeverityAlerts You’ll GetCritical- Domain on blocklist
- Spamvertizing, suspicious plugin(s), or malware found
- Backup or configuration files publicly accessible
- Firewall disabled

High- Domain on spam or URL blocklist
- Suspicious content or administrator account
- Directory listing publicly accessible
- Plugin or theme modified

Medium- Unknown version of WordPress
- Old version of PHP
- Abandoned plugin found
- Plugin or theme update available

Low- Blocklisted URL found in a comment

Choose the alert level that matches the emails you want to receive. Don’t forget to **Save** your settings before moving on.

### 4. Control Other WordPress Alert Emails

[WP Mail SMTP](https://wpmailsmtp.com/pricing/) gives you an extra level of control over WordPress email alerts.

For example, if you get plugin updates from Wordfence after a security scan, you might not want to get plugin update emails from WordPress as well.

We’ll show you how to turn those core WordPress emails off. First, head to the **Email Controls** tab in your WP Mail SMTP settings.

![Email Controls in WP Mail SMTP](https://wpmailsmtp.com/wp-content/uploads/2021/03/wp-mail-smtp-email-controls.png)Scroll down to **Automatic Updates** and turn plugin updates off using the switch.

![Disable automatic plugin update emails](https://wpmailsmtp.com/wp-content/uploads/2021/03/disable-automatic-plugin-update-emails.png)If you want, you can turn off automatic theme update emails and other alerts like:

- Comment moderation emails
- Notifications about email or password changes
- New user account email notifications

This extra control makes it easier to focus on the most important security alerts from Wordfence. And that’s it! You learned how to fix Wordfence not sending emails.

### FAQ on Wordfence Plugin Problems

Let’s take a look at some other issues you might run into with Wordfence alerts.

#### How do I change the Wordfence alert email address?

You can change the Wordfence email under **Wordfence » All Options**. Wordfence uses the site admin email in WordPress by default, and sometimes that address doesn’t exist.

To change your Wordfence email address, open up the **Wordfence » All Options** page in your WordPress dashboard.

![All Options in Wordfence](https://wpmailsmtp.com/wp-content/uploads/2021/02/wordfence-options-settings.png)Scroll down a little and expand **General Wordfence Options**. You’ll see a field labeled **Where to email alerts**.

Delete the site admin email here and type in the email address you want to use.

![Change your Wordfence email address](https://wpmailsmtp.com/wp-content/uploads/2021/02/wordfence-email-settings.png)

#### How do I log Wordfence emails?

You can easily log Wordfence emails with WP Mail SMTP Pro. Head to the **Settings** page and then click the **Email Log** tab.

![Email log settings tab](https://wpmailsmtp.com/wp-content/uploads/2021/07/email-log-settings-tab.png)From here, turn on the options to **Enable Log** and **Log Email Content**.

![Log email content in WordPress](https://wpmailsmtp.com/wp-content/uploads/2021/06/log-email-content.png)Now you can track the alerts Wordfence is sending and open the emails in WordPress. Check out our guide to [using the WordPress email log](https://wpmailsmtp.com/log-emails-wordpress/) for more details.

Once you’ve read your Wordfence alerts, you can easily delete the logs if you don’t want to retain them after reading them.

![View or delete individual email log](https://wpmailsmtp.com/wp-content/uploads/2021/06/view-delete-email-log.png)This can help you to track Wordfence problems right from your WordPress dashboard.

#### Why is Wordfence not sending any email alerts?

Most hosts block the default mail function WordPress uses. When that happens, Wordfence can’t send its alert messages, so nothing reaches your inbox.

#### Which SMTP plugin works best with Wordfence emails?

WP Mail SMTP pairs well with Wordfence. It links your site to a real mail server and makes sure alert emails leave your site without errors.

#### What Wordfence email settings should I check first?

Open Wordfence **»** All Options **»** Email Alert Preferences. Confirm the admin email is correct and that alerts are turned on. Save changes before testing.

#### Can Wordfence send emails through Gmail SMTP?

Yes. Set up WP Mail SMTP, choose Gmail as the mailer, and connect your Google account. Wordfence will then send its alerts through Gmail’s servers.

#### How do I fix the Wordfence API error that mentions email?

Install WP Mail SMTP and run the setup wizard. Once a working SMTP service is active, the API error linked to email delivery usually disappears.

#### Why do my Wordfence emails go to spam?

If you send mail through PHP, many filters mark it as junk. Using an authenticated SMTP service with WP Mail SMTP helps pass spam checks, so the alerts land in the inbox.

#### Can I test Wordfence email alerts before going live?

Yes. In WP Mail SMTP, use Tools **»** Email Test to send a test mail. If it arrives, Wordfence alerts should work as well.

#### Does Wordfence work with email logs for troubleshooting?

When you turn on Email Logging in WP Mail SMTP Pro, each Wordfence alert is recorded. You can see the status and resend failed messages from the log.

#### How often does Wordfence send scan or login alerts by email?

Wordfence sends an alert right after it spots a critical issue or a failed login. Regular scan results are emailed once the scan finishes, based on your schedule settings.

### Next, Secure Your File Upload Forms

Did you know that WordPress limits the files you can upload in WordPress? Sometimes, this means your visitors won’t be able to upload important files.

Check out this guide on [how to fix the “Sorry, this file type is not permitted for security reasons” error in WordPress](https://wpforms.com/how-to-fix-file-type-is-not-permitted/). This guide shows you a completely safe way to allow the file uploads you need without any security risks.

To keep your site secure, we also strongly recommend that you avoid pirated software. Check out [why you should never use WP Mail SMTP Pro Nulled](https://wpmailsmtp.com/wp-mail-smtp-pro-nulled/).

[Fix Your WordPress Emails Now](https://wpmailsmtp.com/pricing/)

Ready to fix your emails? [Get started today](https://wpmailsmtp.com/pricing) with the best WordPress SMTP plugin. If you don’t have the time to fix your emails, you can get full White Glove Setup assistance as an extra purchase, and there’s a 14-day money-back guarantee for all paid plans.

If this article helped you out, please follow us on [Facebook](https://facebook.com/wpmailsmtp) and [Twitter](https://twitter.com/wpmailsmtp) for more WordPress tips and tutorials.

**Categories:** WordPress Tutorials

**Tags:** Email notifications, WordPress email deliverability

---

