WordPress not sending emails is one of the common issues you may encounter as a WP user. This error can prevent you from getting emails from WordPress on important updates or password reset attempts.
Also, if you are using a contact form plugin on your website, you may not receive emails from your users when they try to contact you.
In this guide, we will explain the causes of this issue in WordPress and then show you how to resolve email issues in WordPress.
Why WordPress Fails to Send Emails
WordPress uses a PHP mail function, wp_mail() to handle emails. So if your hosting server is configured to block requests from this server, your WordPress emails may fail to send.
In other cases, your emails may be ending up in the spam folder. This usually happens if you are using a shared IP address on your hosting server. The email service may detect the source as spam, hence storing your messages in the spam folder.
Also, if your contact form plugin is not properly configured, you may end up not receiving emails from your users.
Before troubleshooting the issue, you need to confirm that the emails are not being sent by WordPress. Below we will show you how to test your emails in WordPress.
How to Test Email Server if WordPress is not Sending Email
In case you want to confirm that your WordPress emails are not sending, you can use any of the following methods;
- Use the reset password feature to see if WordPress sends a link to reset your password.
- Send a message from your contact form.
- You can also use the Check & Log Email plugin to check if wp_mail is enabled on your website.
How to Fix Emails Going to Spam Folder
Sometimes emails from WordPress end up in the spam folder. This means your WordPress emails are working but are being read as spoof emails by email service providers. So here are some tips to improve your site’s email delivery.
Whitelist your Email Address to fix WordPress not Sending Emails
If you are using the default PHP mailer on your WordPress site, then your emails may be seen as spam which can affect the Click Through Rate on your email newsletter, and other emails.
You can encourage your users to whitelist your site’s email address so they can see your mail in their inboxes. To do this, users need to add your email as a contact, which tells mail servers to trust your site’s email.
Authenticate your Emails
The easiest way to set up email authentication is to use an SMTP provider to handle your emails in WordPress. Fortunately, you can also use the SMTP service to fix email not sending issues in WordPress.
SMTP is short for Simple Mail Transfer Protocol and is the industry standard for sending emails.
SMTP uses proper authentication to send emails. This means your emails will have high deliverability. Below we will show you how to configure SMTP using the WP SMTP plugin.
How to Fix WordPress Not Sending Emails Issue
The process for resolving this error is a bit long. However, we will simplify it so beginners can follow along with the guide.
But if you do not want to go through the stress of troubleshooting the error, you can request our one-time service so our experts fix it for you.
We will show you how to set this up in five simple steps:
- Install WP Mail SMTP plugin
- Select an Email Service Provider
- Create a Google Web Application
- Add your App API Keys to the SMTP plugin
- Sending Test Email
Step One – Install WP Mail SMTP Plugin
The WP Mail SMTP plugin overrides the default PHP mail function WordPress uses and replaces it with a secure SMTP server. This will resolve any email not sending issues you have on your WordPress site.
To get started using WP Mail SMTP, you need to install and activate the plugin on your WordPress site. For this, login to your WordPress admin dashboard and then go to Plugins >> Add New.
On the Search box, enter “wp smtp” and then click on the Install Now button next to the WP Mail SMTP plugin. Activate the plugin after the installation completes.
The plugin has a setup wizard that makes the configuration much faster. For this, go to WP Mail SMTP >> Settings to open the plugins’ settings page.
On the “General” tab, click on the Launch Setup Wizard button to begin the configuration process.
You will be taken to the setup page. To begin the setup, click on Let’s Get Started.
Step Two – Select an Email Service Provider
The WP Mail SMTP plugin makes use of SMTP for sending emails. So to fix your WordPress not sending email issues, you will need to integrate a third-party SMTP service provider.
There are different options available on the free version of this plugin. We will use Google SMTP for this guide.
To clarify, if you have a google account or a Workspace account, you can use this option as well. On a free Google account, you can send up to 500 emails per day. Which should be enough for most small-scale business owners.
Premium Google cloud users, on the other hand, can send up to 2000 emails per day with the paid plan.
On the setup wizard page, choose the Email Service provider you intend to use. We used “Google / Gmail” in this guide. Select the Google / Gmail option and then click on Save and Continue.
On the next page, you will need to provide your google client ID and API keys to authenticate the service.
This requires creating a web application on the google developer dashboard. It is a straightforward process and does not require writing any code.
Leave this browser tab open and proceed to the next step.
Step Three – Create a Web App
To create your web app, you need to have a developer account. But if you don’t have this, go to the Google Cloud Console website and login/signup using your google account.
Upon login, you will be taken to the cloud console dashboard. You need to create a project before you can have access to the web application tools.
Click the dropdown next to “Google Cloud Platform” on the navigation menu. A popup window will appear showing all the projects on your account. To create a new project, click on New Project.
On the “New Project” page, enter a name for your project (this can be any name). After that, click the Create button.
Enable Gmail API
Now you need to enable the Gmail API on the new project you just created. For this, go to API & Services >> Library.
On the “API Library” page, click the Email category on the left to filter the APIs, and then click on Gmail API.
After that, click the Enable button to activate this API on your project.
Next, click the Create Credentials button to generate your API keys.
Under “Credential Type”, ensure the Gmail API option is selected from the “Select an API” dropdown. After that, choose the “User data” option as the data type you wish to monitor. Click the Next button to continue.
You will need to set up the OAuth Consent Screen. Here, you can use the default name for the App name. Next, enter your email address in the “User support email” and “Developer contact information” text boxes respectively.
After that, click the Save and Continue button.
There is an optional configuration for “Scope”. But we will skip it here because it does not affect the web app we are creating. So scroll down and click on Save and Continue.
Creating Google Web Application – WordPress not Sending Emails
Now, you will need to create your application. For this, select Web application from the “Application Type” dropdown. After that, you can give the application a name. The default name works well as the app will be available to you alone.
Next, scroll to the “Authorized redirect URIs” section and click on the + ADD URI button. After that, paste the URL below into the text box.
Side note: You can get the URL from the WP Mail SMTP setup page.
Finally, click on the Create button to complete your web app setup. Your app credentials are now ready for use.
However, there are additional settings we need to complete before the app can be useful. For now, click on Done, and you will be taken to your cloud dashboard.
You need to make your app public before you can use the API keys on the WP SMTP plugin. For this, go to API & Services >> OAuth consent screen from your cloud console dashboard.
On the “Publishing Status” section, click on the Publish App button to make your app available publicly. Also, set the User Type to “External” if not done by default.
Now, to access the app credentials, click on the Credentials sidebar menu. In the “OAuth 2.0 Client IDs” section, you will see details about the app you just created.
To get the Client ID and Secret, click on the Pencil icon next to the Web application you created. You will see the details you need on the next page. Copy both values as you will need them in the next step.
Step Four – Add App API Credentials to the SMTP Plugin
Now, head back to the WP Mail SMTP setup page and paste the Client ID and Client Secret to their corresponding text boxes. After that, click on the Connect Google button to link both services.
You need to authenticate your Google account before proceeding. We recommend using the same account you used on Google Cloud Console.
In some cases, the verification process may fail due to security checks on your Google account. To bypass this, simply click on the “Go to wpmailsmtp.com (unsafe)” link.
You will be redirected to your WordPress dashboard with a confirmation message that both services have been linked together. Click the Ok button to continue.
Now scroll down and fill in the “From Name” and “From Email” values. WordPress will use this email address to send future emails to and from your site. After filling both values, click on the Save and Continue button.
On the next page, you can choose the features you want to enable on the plugin. The defaults work just fine to fix your WordPress email not sending issue. So click on the Save and Continue button to continue the setup.
You can also skip the step to opt in for the WP Mail newsletter. Finally, the plugin will check your configurations. Once the checks are complete, you can confirm your settings by sending a test email.
Step Five – Sending Test Email
To send the email, click on the Send a Test Email button.
Next, enter the email address you want to send the test email to. Finally, click on the Send email button.
You should receive a success notification from the plugin.
Now check your inbox to confirm that the test email has been sent. You should receive an email from WordPress.
If you received the test email, it means your WordPress website is now using secure SMTP to send emails. This means your WordPress not sending email issue is fixed. And if your emails were going to spam, using the Gmail SMTP server should have fixed that too!
FAQs for WordPress Not Sending Emails Issue
Why is my WordPress website not sending emails?
There could be multiple reasons for this issue. Some common reasons include incorrect SMTP settings, problems with the PHP mail function, conflicts with plugins, or issues with the hosting server.
How can I check if my WordPress website is sending emails or not?
You can use a plugin such as WP Mail SMTP to test if your WordPress website is sending emails or not. This plugin allows you to send a test email to an email address of your choice.
What are the SMTP settings, and where can I find them?
SMTP settings are the parameters used to configure the email client for sending emails. You can find these settings in the email service provider’s documentation or the email account’s settings.
What should I do if I have incorrect SMTP settings?
You can correct the SMTP settings by going to the WordPress dashboard and clicking on the “Settings” option. Then, go to the “Email” tab and enter the correct SMTP settings.
How can I fix the PHP mail function not working issue?
You can fix this issue by installing the WP Mail SMTP plugin and configuring it to use a third-party SMTP service.
What should I do if there are conflicts with plugins?
You can troubleshoot plugin conflicts by deactivating all plugins and then reactivating them one by one to find the problematic plugin.
How can I fix issues with the hosting server?
You can contact your hosting provider and ask them to check if the email service is functioning correctly. They may also be able to provide guidance on how to fix the issue.
Can I use a plugin to fix WordPress not sending emails issue?
Yes, you can use plugins like WP Mail SMTP, Easy WP SMTP, or Post SMTP to fix this issue.
What can I do if none of the solutions work for me?
If none of the solutions work, you can contact a WordPress developer or hire a support service like FixRunner to help you fix the issue.
WordPress not sending emails can negatively impact your site. And if you are a store owner, the effects can be worse. This is because users will not receive an invoice that sometimes contains the link to download digital products.
This guide has shown you how to resolve the WordPress not sending email issue by using an SMTP service provider to route your WordPress emails. We also shared some tips to prevent WordPress emails from going to the spam folder.
However, if you are still unable to send and receive emails on your WordPress site after following the steps in this guide, then you can reach out to our team of experts for further guidance.