fbpx

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.

Test Email:

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.

testing if emails are being sent on wordpress

 

You will then receive a confirmation mail to your inbox.

 

wordpress confirmation email

 

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.

 

Problem Scenarios

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
  • Gmail using Post SMTP
  • Mailgun
  • SendGrid
  • Email0
  • SparkPost
  • Mailjet
  • Amazon SES

Option 1: Gmail SMTP Plugin:

 

Step 1: Installation :

 

Login to your WordPress dashboard and click on Plugins and then select Add New

 

add new wordpress email plugin

 

Then in the search box, enter “Gmail SMTP” and click Install now when it appears.

 

install gmail smtp

 

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.

 

gmail smtp setting

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’.

 

setting google api for wordpress emailing

 

Then go to the next page and click on Go to credentials.

 

email credentails setup

Add Credentials:

On the “Add credentials” page, set the API to “Gmail API”. Now select “Web browser (Javascript)” as ‘the place from where you would be calling the API from’. Now select “User data” as ‘the data you would be accessing’. Now, click on What credentials do I need?

 

add credentials to your project in google api

 

 

Next opens a new page. Enter a name for authorization client and now in the“Authorized Javascript origins” input box, enter your blog’s URL.

 

Now your “Authorized Redirect URI” is provided in your Gmail SMTP plugin page, copy that whole link.

 

email redirecting link setup

 

Paste it in your Gmail credential page, and click on Create Client ID.

google api wordpress email setup

 

Next enter the email address you want to use, and enter a product name and click on Continue.

 

add gmail smtp credentials to google api

 

This is now the final step, click Done.

 

add gmail smtp credential to your project

 

You will be taken to the credentials page. Here you have to select the name of the credential you just created.

 

after adding gmail smtp credentials to google api

 

In the very next page, you will see your Client ID and Client Secret.

 

client ID and secret for gmail smtp

 

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.

 

setting up gmail smtp on wordpress

 

After the settings have been saved, click on the “Grant Permission” button.

 

gmail smtp last step

Note:

 

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.

 

allow google api to sync with gmail smtp

 

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”.

 

check gmail smtp status from settings

 

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.

 

sending email from gmail smtp

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.

 

sending first email from gmail smtp

 

 

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.

Source:- https://www.fixrunner.com/how-to-solve-wordpress-not-sending-emails-issue/

Option 2: Configure Gmail SMTP using Post SMTP

First install a free plugin called Post SMTP, also earlier known as Postman SMTP.

 

post smtp setup

Step 1:

 

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.

Step 2:

Now click on “Start the Wizard” in the Post SMTP setup.

 

setting for post smtp setup

 

Step 3:

 

Input the authenticated email address you want to send mail as and your name. Then click “Next.”

 

post smtp sender detail

 

Step 4:

 

Now you have to enter the outgoing mail server hostname, and then click “Next.”

 

post smtp outgoing mail server hostname

 

Step 5:

 

Now configure how the connection to email server is established and then click “Next.”

 

post smtp api setup

 

Step 6:

 

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.

 

post smtp from google api

 

Step 7:

 

Name your project and click on “Create.”

 

google api post smtp setup

 

Name Google Project

Step 8:

 

Go to “Enable APIS and Services” in the dashboard of the new project.

 

post smtp google api enable api

 

Step 9:

 

Now click on “Gmail API” under G Suite APIs.

 

gmail api access

 

Step 10:

 

Click on “Enable.”

enable gmail api for post smtp

 

Step 11:

 

Now choose “OAuth client ID” in the left-hand side of “Credentials”.

 

add credentials to project

 

Step 12

 

Click on “Configure consent screen.”

 

configure google api for post smtp

 

Step 13

 

Now enter your email address, a product name, and a privacy policy URL.

 

enter details for post smtp email url

 

Step 14

 

Next, you will get a prompt for the application type. Choose web application and enter a name. Now paste the “Authorized JavaScript origins” URL and the “Authorized Redirect URIs” from the Postman wizard screen, and click “Save.”

 

post smtp create client id

 

The top two in the wizard are your Authorized JavaScript origins URL and Authorized redirect URIs.

 

post smtp authentication

 

Authorized redirect URI

 

Step 15

 

Now you will get your client ID and client secret.

 

get client id and client secret

 

Step 16

 

Now copy and paste them in the Client ID and Client Secret fields in the Post SMTP wizard. Now click “Next” and then “Finish.”

 

last step for post smtp setup

 

Step 17

 

Now back in the Google Developer Console, add your domain so it can be verified.

 

post smtp add domain for verification

 

Step 18

 

Now, “Grant permission with Google” and click to allow your Gmail account access.

 

grant permission post smtp

 

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.

 

post smtp this app isn't verified

 

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’.

 

Step 19

 

Now you can send a test email for verification.

 

post smtp send a test email

 

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.

 

sendgrid

 

send grid setup

 

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.

 

use email account for smtp server

 

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.

 

smtp email authentication

 

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.

Conclusion:

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.

Leave a Reply