Is your WordPress Installation not sending out emails? See how you can fix the issue here.
There are several reasons why your WordPress installation is not sending emails. But before that, let us test if your WordPress installation is having issues sending emails.
To begin with, run a test on your WordPress site. You can do this with the free email plugin. This plugin is used to test for proper WordPress installation and email setup. Once the installation is complete, go to your WordPress Dashboard. Now click on the tools menu and then select “check email”. Now select the “send test email” button.
You will then receive a confirmation mail to your inbox.
Check your inbox for the test mail. If you couldn’t find it there, give a look into spam or junk folder too.
Check your email client to see if you received the test email. The subject line will appear as “Test email from https://yourdomain.com”. Also, make sure to check your spam or junk mail folder. If you received an email that means that WordPress can send emails just fine on your web server. This means it is most likely a non-configuration with your contact form plugin or an incompatibility. You can always reach out to the plugin developer for help. Let them know that you ran the above test and that email is working on your WordPress installation itself.
One can come across this problem of not sending or receiving WordPress emails, mainly in these scenarios:
- Contact Forms submission
- WordPress Notifications
- 3rd Party Plugins
Most Common Reasons why WordPress Fails To Send Email
- The most common reason for not being able to send emails is your WordPress hosting server. It may not be configured to use PHP mail() function.
- In some cases, it happens that email providers may use some tools to reduce email spam. And these tools detect whether an email is originating from the location it claims to be originating from. And often mails from WordPress websites fail this test.
- Your Underlying SMTP Server Isn’t Configured Properly
- If you are on a shared server environment, chances may be that your sender reputation is shared. WordPress site’s underlying SMTP server is sharing your Sender Reputation with hundreds, and sometimes thousands of other senders.
Here are all the solutions you can try to fix email delivery:
Setup of an SMTP Server Plugin:
SMTP is an industry standard for sending emails. It uses authentication that increases email deliverability, unlike PHP mail function. When you install an SMTP server plugin, WordPress send your emails directly from your SMTP Server. Unlike previously when it used to send emails using your web host email server.
Also, the PHPMailer Library is used by SMTP instead of the PHP mail function. This makes sure you receive your emails directly in inbox unlike dropping them into a spam folder.
One can set up an SMTP Server Plugin, mainly in 6 ways:
- Gmail using Post SMTP
- Amazon SES
Option 1: Gmail SMTP Plugin:
Step 1: Installation :
Login to your WordPress dashboard and click on Plugins and then select Add New
Then in the search box, enter “Gmail SMTP” and click Install now when it appears.
Once the installation is completed, click Activate.
Now you would be taken to “Plugins” page. Here you can find a message on top indicating that your plugin has been activated. Search for the Gmail SMTP plugin and click on Settings.
Step 2: Authorising the plugin:
Now, we authorise an SMTP plugin to send emails using Gmail account. To make this work, create a google web application and generate API keys.
Go to Google App Creation Page and log in with your Google account. Go to “register your application” page, and select “yes” for both items. Now click on ‘Agree and Continue’.
Then go to the next page and click on Go to credentials.
Now your “Authorized Redirect URI” is provided in your Gmail SMTP plugin page, copy that whole link.
Paste it in your Gmail credential page, and click on Create Client ID.
Next enter the email address you want to use, and enter a product name and click on Continue.
This is now the final step, click Done.
You will be taken to the credentials page. Here you have to select the name of the credential you just created.
In the very next page, you will see your Client ID and Client Secret.
Copy the “Client ID” and “Client Secret” into their corresponding input boxes in the Gmail SMTP plugin settings page. And enter the Gmail address you are using in the “OAuth Email Address” and “From Email Address” Input boxes.
Now enter your “From Name”, which is the name that would show when a person receives your message.
In “Type of Encryption” box, select TLS. Enter 587 in the “SMTP Port” input box.
Tick the “Disable SSL Certificate Verification” box, if you don’t use the SSL certificate on your server. However, you should use SSL for all your sites. Now click on Save Changes.
After the settings have been saved, click on the “Grant Permission” button.
In case you receive any message warning showing that your app has not been verified, click on Advanced. And click the Go to (URL) link. Then in the authorization page, click Allow.
Now you would be taken back to your plugin settings page. Here you should see an “Access Granted Successfully” message at the top. Also, SMTP Status should now be “Connected”.
And you’re done. Now your WordPress is configured to send emails using Gmail SMTP.
Step 3: Testing Your Gmail SMTP Plugin
Now you can send an email to check if it is working. For this testing, just switch to the “Test Email” tab in your plugin. Now fill out the “To”, “Subject”, and “Message” fields and click on Send Email.
Now you should have received the test email in your inbox.
If all the above steps are followed correctly, but still you face any problem, or don’t receive the test email, then the reason may be that the connection port(587) is disabled by your web host.
- How to fix SMTP Plugin not connecting to Gmail Server
The reason behind this is the plugin not being able to connect to Gmail servers.
The first time after installing this plugin, you may get an error like this.
In the second line, you can find the plugin could not connect with Gmail using port 587. If you get a similar error, then your web host may be blocking that port. Try to contact them to open port 587. In case, you don’t want to or can’t contact them, then change the connection type to SSL and the port to 465. Now again send another test mail for confirmation.
Option 2: Configure Gmail SMTP using Post SMTP
First install a free plugin called Post SMTP, also earlier known as Postman SMTP.
Here we would be using the OAuth 2.0 protocol for authorizing access to Gmail API. This is thus a more secure login system and also users don’t have to enter any username or password.
This plugin also supports other providers and setups, so, even in case one don’t use Gmail can hookup this to any third-party SMTP provider.
Now click on “Start the Wizard” in the Post SMTP setup.
Input the authenticated email address you want to send mail as and your name. Then click “Next.”
Now you have to enter the outgoing mail server hostname, and then click “Next.”
Now configure how the connection to email server is established and then click “Next.”
Now open a new tab. Go to console.developers.google.com and log in with the Gmail you will be using to send emails. Now create a new project.
Name your project and click on “Create.”
Name Google Project
Go to “Enable APIS and Services” in the dashboard of the new project.
Now click on “Gmail API” under G Suite APIs.
Click on “Enable.”
Now choose “OAuth client ID” in the left-hand side of “Credentials”.
Click on “Configure consent screen.”
Authorized redirect URI
Now you will get your client ID and client secret.
Now copy and paste them in the Client ID and Client Secret fields in the Post SMTP wizard. Now click “Next” and then “Finish.”
Now back in the Google Developer Console, add your domain so it can be verified.
Now, “Grant permission with Google” and click to allow your Gmail account access.
There may be cases that you come across such error as displayed below. Because Google has recently enhanced their risk assessment. And web applications will require manual review before users can approve data.
You should click on “Advanced” and proceed to fill out this developer application to get approved long-term. You will then get an “Access Granted Successfully” message and the SMTP status will show ‘connected’.
Now you can send a test email for verification.
Now, you will receive a mail like in the image below.
Option 3: Configure SendGrid SMTP in WordPress
SendGrid is another great alternative. They provide a free trial, that allows up to 40,000 emails in the first 30 days. One can also download their free WordPress plugin from the WordPress repository. This replaces WordPress’s default wp_mail() function by using either an SMTP or API integration. SendGrid is known for its great email deliverability and secure mail. All you need to do is, install the plugin. And click into it under your WordPress dashboard settings and configure it with your API key.
Option 4: Use your email account SMTP servers
All you need to do is download, install and activate the WP Mail SMTP plugin from the WordPress repository.
Once it is activated, click on the Settings link, then the email link in the sidebar to configure the plugin.
Now enter your email address and name. In the Mailer section, make sure to select Send all WordPress emails via SMTP option. In SMTP Options, complete configuration using your HostPapa email server settings. And you will find these by heading to My cPanel in the HostPapa Dashboard. Now click on the Email Accounts button.
Scroll down to Email Accounts and click on the Set Up Email Client link to view your SMTP settings. Select Yes: Use SMTP authentication option and enter your SMTP login details.
Click the Save Changes button. Then test your settings by entering an email address in the To field under Send a Test Email. Now click the Send Test button to proceed.
Remember, we offer free quick fixes! Just get in touch and have one of the team members take a look. Hope you have now successfully setup your new SMTP mail provider! Happy WordPressing!
Contact now to WordPress Developer.