Is WP 2FA not sending email notifications with the one-time password?
WP 2FA adds two-factor authentication to your login form and sends an OTP through email. Without the email notifications, you could get locked out of your website.
In this article, we’ll show you how to easily solve this email deliverability issue so that emails from WP 2FA always reach your inbox.
Why Am I Not Receiving My Two-Factor Email?
You’re likely not receiving two-factor authentication emails because they’re being filed in the spam folder. This is a super common problem with WordPress emails.
You can easily solve this by using the WP Mail SMTP plugin that adds authentication to your messages and help them bypass spam filters.
In the tutorial below, we’ll show you how to set it up.
How To Fix WP 2FA Not Sending Email Problem
Ready to fix the WP 2FA email deliverability problem?
- Check One-Time Code via Email Is Enabled
- Check From Email and Name in WP 2FA Settings
- Install the WP Mail SMTP Plugin
- Choose a Mailer Service
- Enable Email Logging
Let’s first check the WP 2FA settings.
1. Check One-Time Code via Email Is Enabled
For WP 2FA to send codes via email, you need to make sure the email method is enabled in the plugin settings.
To check that, from the WordPress dashboard, go to Settings » Two-factor Authentication.
Under the 2FA settings tab, you need to make sure there’s a checkmark next to the ‘one-time code via email (HOTP)‘ method.
If you have other methods enabled, that’s fine. It won’t stop the emails from being sent.
Let’s move on to check if we have the correct sender settings for sending OTP emails.
2. Check From Email and Name in WP 2FA Settings
One-time password emails could still go to spam if they are sent using the default WordPress email settings.
WordPress will either use the admin email or the default WordPress email ([email protected]) for sending notifications from WP 2FA. It’s good practice to change this to an email address from your domain.
To configure the email sender option, switch to the Email Settings and Template tab from the same WP 2FA settings page.
In the From email & name section, select the radio button that says ‘Use another email address‘ and type in the From Email you want to use.
Now, scroll down to the page and save the settings for the changes to take effect.
Now let’s install WP Mail SMTP to make sure the emails arrive.
3. Install the WP Mail SMTP Plugin
WP Mail SMTP is hands down the best SMTP plugin for WordPress. It connects your website to a third-party email service that adds authentication to your messages.
To download the plugin, log in to your WP Mail SMTP account and click the orange button under the Downloads tab to get the latest version of the plugin file.
Switch to your WordPress dashboard and go to the plugins page. Here, upload the file you just downloaded to install the plugin.
If you are new to WordPress or don’t know how to upload a plugin file, you might want to check out this guide on installing a WordPress plugin.
Once the plugin is installed, be sure to Activate it. As soon as you do that, the plugin’s Setup Wizard will start in your browser.
Let’s work through the steps in the Wizard.
4. Choose a Mailer Service
The first step in the Wizard is to choose a mailer service. To begin, click the Let’s Get Started button.
WP Mail SMTP supports several third-party mailers. What you choose here will depend on the type of website you have.
Some mailers like Sendinblue have a free plan that you can start with and later add credits if you need more emails.
If you are looking for a premium mailer that specializes in sending transactional emails, we recommend SMTP.com.
You can check out our guide to learn more about each mailer that WP Mail SMTP supports.
Each email service has different steps to set up an account. You can click the below link to open the documentation page and follow the steps.
|Mailers available in all versions||Mailers in WP Mail SMTP Pro|
|Gmail / Google Workspace|
Switch back to this guide after you’ve established a connection and moved on to the next step.
5. Enable Email Logging
In the next step, the Wizard will have two options enabled by default.
- Email deliverability
- Error tracking
If you have the Pro version of the plugin, you can enable the Detailed Email Logs. This will let you track every email that your website sends.
By default, the log will not include the email content, so you don’t have to worry about it exposing the two-factor authentication codes.
If you decide you want to turn on full email logging, check out how this works in our article on how to log your WordPress emails.
Finally, grab the license key from your WP Mail SMTP account and paste it into the box to enable Pro features and future updates.
And that’s it! You’ve done everything to fix WP 2FA not sending email problem. Registered users on your site will now be able to receive two-factor codes in their email inbox.
Next: Add More Security to Your Website
Adding two-factor authentication to your login form is a great way to add security to your website.
Hackers can still try to break into your website through vulnerabilities in the plugins or themes. You will need to have a plugin that can secure your entire website against security threats such as brute force attacks.
You can check this guide that lists some of the best security plugins available for WordPress.
Ready to fix your emails? Get started today with the best WordPress SMTP plugin. WP Mail SMTP Elite includes full White Glove Setup and offers a 14-day money-back guarantee.