Created a contact form, but you’re no longer receiving WordPress notifications to the e-mail address tied to the WordPress Admin Section account? The default function responsible, PHP mail(), is the cause. It earned a bad reputation because people abuse it for spamming or e-mail scamming. Consequently, email service providers have filters in place to block such e-mails. As an alternative, we recommend implementing SMTP (Simple Main Transfer Protocol). It’s an industry standard and has proper authentication measures. By doing that, you learned how to fix WordPress not sending email issue.
How to check if WordPress website can send emails
To do a quick check, install WPChill’s Check & Log Email plugin. If you need help, here’s how to install WordPress plugins. When activated, click on Tools, then Check Email on the left-hand side of your WordPress Admin dashboard. Enter an e-mail you can check under Send a test email and click on the Send test email button. You’ll receive a confirmation even if it arrived at your Junk/Spam folder, so make sure to check those too.
I can’t receive emails from WordPress. Why?
If you tested your WordPress website email delivery and it works for others, but not you, it’s most likely one of these 2 things:
1. The outgoing server for emails uses a port blocked on your network
For example, Comcast blocks port 25 to prevent spam, which is the default one used for SMTP. You can try port forwarding 25 on your router to see if there are changes. If that fails, change the default SMTP port to 587 or 465 in the SMTP server configuration. Some SMTP providers also offer 25025, an SMTP port used alongside SSL (Secure Sockets Layer) and TLS (Transport Layer Security). Don’t utilize 2525, since it’s used for SMTP without encryption.
2. Firewall is blocking the port
This means your router and ISP allow the port, but the Firewall on your computer doesn’t. You’ll have to add rules to allow it through or disable Firewall altogether (not recommended).
Emails aren’t sent from the contact form. Help!
Well, if you verified that your email web server can be reached, there must be something wrong with the contact form plugin you’re using. It most likely has to do with its configuration, or that you made a typo or error somewhere. Due to the number of contact form plugins available and multiple ways to implement it, this warrants a deeper look. Also, by following the methods below, the issue might disappear on its own.
Can hosting cause the WordPress not sending email issue?
Reputable hosting providers have their own SMTP servers and either immediately guide you to create an email account or set it up for you. Unfortunately, people, to save a few bucks, opt for low-quality hosting. Even if they do have SMTP, it might not be configured properly or the hosting isn’t following the best mailing practices.
How does that affect users?
If you share a server with people who spam, utilize purchased lists or data leaks, receive complaints all the time, or have a high bounce rate, you can get blacklisted, even though you’re innocent. On the other hand, sharing a server with owners in good standing can benefit your own percentage of successfully delivered emails. That’s why we recommend a provider who maintains a good reputation and has strict rules. A good example of that are the two mentioned below:
1. Steps to fix WordPress not sending email issue with an external SMTP service
Using an external SMTP server provider is a great option. Typically, they offer a free forever plan, although up to a certain limit. Based on a provider in question, you might only be able to send between 100 and 500 e-mails within 24 hours or a total monthly cap. This is ideal for small websites, and each provider provides paid plans to expand this limit. With that said, we already made a list of the best email plugins for WordPress. For demonstration, we’ll use Sendinblue. It has a beginner-friendly interface with advanced features and allows you to send up to 300 emails per day for free. As you grow, it will become a staple in your email marketing toolbox. Now, follow these steps to fix WordPress not sending email issue with Sendinblue:
1. Create a Sendinblue account and sign in
Head on over to the Sendinblue’s Sign Up page and make an account. Fill in the required details. Don’t worry if you skipped some since you can set them up on the Dashboard page after the registration.
2. Set up a subdomain on your website
Now’s the time to set up a subdomain from which you’ll send emails to yourself and other visitors. Keep in mind that steps depend on the hosting you’re using and their cPanel design, To demonstrate the process, here’s how to add and set up a subdomain on Bluehost:
- Sign in to the Bluehost cPanel.
- In the menu on the left, click on Domains, then select Subdomains.
- Add a subdomain in the first text field. We recommend “mail1“ or anything other than “mail” because it might already exist or is blocked by the hosting.
- if you have multiple domains, select the correct one, and click Create.
- To clarify, the result should look like this: mail1.yourwebsite.com.
3. List your subdomain as a sender
Go back to the Sendiblue Dashboard tab, and then:
- Click on Settings in the left-hand side menu.
- Click on the Configure button under Your Senders.
- Switch over to the Domains tab at the top, then click the Add a New Domain button in the top right corner.
- Paste your entire domain without HTTPS or www, e.g. mail1.yourwebsite.com.
- Check the box below, then click on Save.
- Now’s the time to authenticate the subdomain by using the lines of TXT Value shown in the pop-up.
- Tip. if you accidentally close the pop-up, click on Authenticate This Domain button next to the subdomain name to bring it back up.
4. Adding TXT records with your hosting
Sign back into the Bluehost cPanel, then click on Domains tab > My Domains on the left-hand side. Then, follow these instructions:
- Click on the Manage button next to your domain name.
- Navigate to the TXT Value part of your DNS records.
- You’ll see 5 or more rows. Also, there will be 3 main columns: Host Record (might be called Host, Host Name, or just Name on another hosting), TXT Value (might be called TXT Data elsewhere), and TTL (On Bluehost and many other hosting providers it’s written as 24 hours / 86400 seconds. It could also be 1 hour, such as on GoDaddy. Do a quick Google search for TTL + the hosting name)
- Click on the Add Record button in the top right corner.
Adding the first record
Fill the first record fields like this:
- Host Record: mail._domainkey.mail1
- TXT Value: Paste the first record from the Sendinblue popup.
- TTL: 1 day
- Record Type: TXT (This option might not show up on another hosting)
Click on Save.
Adding the second record
Now’s the time to enter change the second record like this:
- Host Record: mail1
- TXT Value: v=spf1 include:spf.sendinblue.com mx ~all
- TTL: 1 day
- Record Type: TXT (This might not exist on another hosting)
Click the Save button.
Entering the third record
Complete the third record as follows:
- Host Record: mail1
- TXT Value: Copy the third piece of code from the Sendinblue pop-up.
- TTL: 1 day
- Record Type: TXT (Might be missing on another hosting)
Save the changes.
Adding the fourth record (Not needed on Bluehost)
Sendinblue offers DMARC (Domain-based Message Authentication, Reporting, and Conformance) record code for those with a need and experience with it. It’s not needed for this purpose, and it’s best if you skip it.
4. Verify records with your hosting
Go back to the Bluehost tab. If you closed it, get to the Authorize This Domain pop-up again. You’ll notice that you can now click on the Record Added. Please Verify It buttons below each of the 3 pieces of code. Do so, and wait for 24-48 hours. Once Bluehost verifies them, you’ll see a ✓Configured message in the top right corner of each code.
5. Configure Sendinblue in WP Mail SMTP
While waiting for verification, finish setting up Sendinblue with WordPress like this:
- Install a WordPress plugin for SMTP. We recommend WP Mail SMTP because it’s versatile and supports both third-party mailers and custom SMTP configurations.
- Click on WP Mail SMTP > Settings on the left-hand side of the WordPress dashboard.
- Enter the name you want to appear in emails (From Name) as well as an e-mail address (From Email). Don’t put a checkmark in front of Set the return-path to match the From Email because Sendinblue doesn’t support it. Check if your hosting does.
- Under Mailer, select Sendinblue.
- You’ll need to add an API key now. Simply click on the link underneath the API key box and you’ll be redirected to the SMTP & API page in Bluehost cPanel. Copy the v3 API key from the Your API Keys > API Key column and paste it over to the appropriate field in WP Mail SMTP settings.
- Hopefully, this fixed WordPress not sending email issue. Unfortunately, until your records are verified, you can’t test the email.
2. Use Gmail SMTP to fix WordPress not sending email issue
Although Gmail is technically an external service, it deserves its own space. After all, it’s well-known, reliable, and will work long-term. It’s also convenient if you use Gmail already as a form of communication. Additionally, this method doesn’t require you to create a subdomain, nor wait a long time to verify records. However, if you change your e-mail address, you’ll have to do this all over again. With that said, let’s get into instructions to fix WordPress not sending email issue via Gmail SMTP:
1. Choose and install a WordPress plugin
We’ll continue using WP Mail SMTP for demonstration purposes. However, you can install a simpler solution, such as Post SMTP. There’s also a dedicated plugin, simply titled Gmail SMTP. With that said, follow steps 1 and 2 above. Here’s what to do next in plugin settings:
- Under From Name, enter the name that will appear in emails.
- Under From Email, enter the Gmail address you’ll use from now on.
- Now you have to choose between 2 methods to use Gmail SMTP. We strongly recommend OAuth Authentication, since it’s more secure and effective. For that reason, enter the same Gmail address under OAuth Email Address.
- Unlike above, you can check the box in front of Set the return-path to match the From Email to get notifications to your email.
- Scroll down, and under Mailer, select Gmail.
- Now you’ll see 3 options:
- Client ID. It’s empty.
- Client Secret. It’s empty as well.
- Authorized Redirect URI. Has a long link.
- Don’t close the tab.
2. Create a Google app with Gmail API
Here’s what to do after you open the Google Developers Console page:
- Sign in with the Gmail account you intend to use to send emails from.
- We’ll assume you’ve never used Google APIs before, and Google will prompt you to start a new project. If it doesn’t, click on the drop-down menu next to the Google APIs icon in the top left corner.
- Click on Enable Apps and Services.
- Search for ‘Gmail’, select Gmail API, then click on Enable.
- After an interface for a Gmail API opens, click on the Create Credentials button.
2. Start adding credentials
On the Add credentials to your project page, follow these steps:
- Fill the text fields as follows:
- Which API are you using? Select Gmail API.
- What data will you be accessing? Check the circle in front of User data.
- Now, click on the What credentials do I need? button.
3. Create the consent screen
When prompted, click on Set Up Consent Screen in the bottom right corner of the window. Then, follow these steps:
- Under User Type, select External, then click the Create button below.
- On the next screen, under the Application name, choose something similar to Gmail SMTP Sender.
- Enter your Gmail address under Support Email.
- Tip. You’ll be the only one to see this information, so don’t worry too much about it.
- Click on Save.
4. Finish adding credentials
Go back to the previous page (Credentials tab) and then follow these instructions:
- Under Name, choose something related, for example, WP Website Email.
- For Authorized Redirect URI, paste the URI from the third field (main step 1, sub-step 6) in WP Mail SMTP plugin settings.
- Click on Refresh, then Done.
5. Utilize credentials
To make use of Client ID and Client Secret, do the following::
- In the table named OAuth 2.0 client IDs, click on the Name (WP Website Email in our case) and a new window opens.
- Tip. If that didn’t work, click on the Edit icon (pencil) in the far right corner.
- You can now see Client ID, Client Secret, and Creation Date. Copy the data under Client ID and Client Secret.
- Go back to your WordPress SMTP plugin tab. Paste the data into the respective empty fields below URI.
- Click on the Allow plugin to send emails using your Google account button under Authorize.
- When redirected and prompted, click on Allow to give permission.
- Now you’ll see an error message that OAuth 2.0 authentication is configured, but you have no permissions to use it.
- Click on the Grant permission with Google link.
- On the “This app isn’t verified“ screen, Google asks you to assess risk.
- Since you made it yourself, click on Go to “your website URL”.
- After a redirect, you’ll see a message indicating you successfully fixed the WordPress not sending email issue.
- If it doesn’t say you can start sending emails through Google, follow the on-screen instructions.
- Optional. Switch over to the Email Test tab in WP Mail SMTP Settings, enable HTML, and select any email address to double-check.