[Solved] How To Fix WordPress Not Sending Email Issue Under 5 Minutes

It is the most common error of WordPress website that requires only a few minutes to fix. Many website owners set up their contact form but forget to test the contact form is working or not? Most of the time it is not working. In this post, I’ll tell you how to fix WordPress not sending email issue under 5 minutes. 

In my case, I’m using Happyforms to build contact form and other necessary forms but the problem occurs at the time of testing the form. Contact Form is not sending the email or any notification. Customers or users often contact using the contact form but the worst scenario is you are not getting any mail and even your contact form not saving the data in your dashboard. You can lose potential leads so fixing wordpress not sending email issue it very important. 

Which is the best form builder plugin?

I would like to suggest HappyForms. The best drag and drop form builder with extended features. You don’t require any addons. The one plugin has all the premium features and you know, Happyforms is a 100% free plugin available in the official wordpress repository. 

You can read more about Happyforms here – more about HappyForms

No need to write CSS code for styling the form, All the necessary elements are available in this plugin from creating to designing the form. You can also enable spam protection, save entries to database etc. 

Get HappyForms

Fix WordPress not sending Email Issue

Fixing this issue will only take a few minutes if you don’t want to use a third party SMTP provider (simple mail transfer protocol). But it is the best practice to use SMTP provider instead of using own server to send the email.

The reason behind the error

The main reason is WordPress hosting server is not configured to use PHP mail() function. If anyhow they enable it to send the emails, many spam detection tools used by various email delivery service provider check the email originating point and verify it and most of the cases wordpress websites fail to verify, even the email does not appear in the spam box of the destination folder and the issue arises. 

So don’t even send your newsletter using the wordpress default mail function.

Why third-party SMTP provider

SMTP is the industry standard to send emails. Unlike PHP mail() function, SMTP needs proper authentication to assure email deliverability. 

It also reduces the server loads and does not affect your site performance. 

We recommend using Elastic Email or Mailgun for sending the emails.

Final Step – Fixing the issue

To fix wordpress not sending email issue, first, you need to install a free plugin by following the link – WP Mail SMTP by WPForms

wp mail smtp
WP Mail SMTP by WPForms

After installing this plugin you need to follow the below steps to configure it properly. 

First, you need to go dashboard > settings > WP Mail SMTP setting page. You will see a page where you need to fill some details like Form Name, Email address, checkbox return path etc.

wp mail smtp setting
WP Mail SMTP Setting

If you don’t want to use third-party SMTP provider, just fill the form and choose default from the setting. Hit the save button and the problem will be fixed.

But if you are using a third-party SMTP provider, you need to know some other details about it. 

Using Third-Party SMTP Provider With WP Mail SMTP

If you are using a third-party email delivery service like Elastic Email or Mailgun as I mentioned above in this post, you need to fill some other details in the form. 

First, create an account with an email delivery services. 

Elastic Email – 150000 emails free every month – Start with free

Mailgun – 10000 emails free every month – start with free

The best way to know a service is using its offer or trial plan for free. The above services give you free plan to decide whether it is best for you or not. So go with the one you like the most.

After creating an account, you need to add your domain to verify. It will take some time depends upon the SMTP provider you go with. After successfully completing this process, you can use their SMTP/HTTP API services. 

Benefits of Third Party SMTP Provider

  • No Extra loads on your server. All emails will be handled by your email delivery service provider.
  • The email will be delivered in the inbox, not in the spam folder.
  • Quick delivery of emails. 
  • Check bounce rate, email validation and detailed analysis and tracking of the emails and many more.

SMTP/HTTP API – Which one you should use?

This question is really very important. I will suggest you, use HTTP API over SMTP Relay. HTTP API is faster and better for large-scale sending. 

SMTP is very flexible to integrate within the application. As the WP Mail SMTP plugin has only a few options for API such as Mailgun, Gmail Suit, SendGrid you need to use SMTP for other email delivery services. 

Want to know more about SMTP/HTTP API – Read here

How to Setup Mailgun In WordPress?

Use the same plugin as I mentioned above WP Mail SMTP and follow the step below. First, go to the WP Mail SMTP setting page after installing and activating the plugin. follow dashboard > settings > WP Mail SMTP 

Mailgun SMTP setting wordpress
Mailgun SMTP Setting – WordPress

Now you need to enter API and domain name. You will get this information in your Mailgun dashboard. Just copy and paste here and hit the save button. Done.

If you are using an SMTP provider not listed in the plugin page. Select other SMTP services and enter your SMTP details in the page. 

other SMTP
Other SMTP

Enter your SMTP host you will get from SMTP provider. For eg. smtp.mailgun.com, smtp.gmail.com etc. 

Enter Encryption type. It can differ depends on your hosting provider. Some hosting provider blocks the ports for security purpose, then you need to contact them and ask to open the port. 

Port 587 for TLS (recommended)

and Port 465 for SSL

the last one is Port 25 for None

The lost step is authentication. Here, you need to enter your username and password of the SMTP host. You can directly enter your username and password here but it is recommended to set the password in your wp-config.php file.

Open your wp-config.php file and enter the below lines in it.

define( 'WPMS_ON', true );
define( 'WPMS_SMTP_PASS', 'your_password' );

After adding the lines, go to your SMTP setting page and refresh it. You will see your password box filled and disabled. Now you need to only enter your username here and good to go. 

Hit the save button and test your email setting by visiting the Email Test tab on the same page. 

Common Error – 

Maybe your mail will not send. Try checking your port first after that contact SMTP provider. 

To check your port is open or not follow the steps below.

Open command prompt or terminal in your system. Type telnet yourdomain.com 587. Change port and domain name with yours. 

It will give an error if Telnet is not enabled. Follow the steps in the below paragraph to enable it.

If a port is open it will give success message else it will refuse to connect with your host then try asking your host provider to enable it. 

If telnet is not enabled in your computer(windows) –

Open Control Panel first, find Programs and click on it. Then navigate programmes and features > Turn Windows features on or off.

Click on it and you will see a box. Find the Telnet Client and check it to enable it. Wait for a few seconds and it will be done. 

Conclusion

Communicating with your users and client is very important for a business. What will happen, if you will stop communicating with them or don’t reply them back? No matter what is the reason behind it. 

But it will be worsed if you don’t get the emails from the clients because of your website error. Therefore it is important to use a third-party email service delivery like Mailgun or Elastic Email and WP Mail SMTP plugin makes your work easy. 

WP Mail SMTP helps you integrating third-party SMTP easily within minutes. No hard coding, no too much setting. Just enter a few details and your issue will be resolved. 

Hope you like this post. For more stuff like this don’t forget to subscribe #wpyard. Also, follow us on Social media channels – Just search #wpyard.

Let me know if you have any query or suggestion. Feel free to leave a message in the comment box below. If you need any assistance regarding wordpress website, feel free to contact me. Check more details on – hire me page.

Get More Cool Stuff

WordPress, SEO & Link Building, Marketing, Blogging Tips, Once a Week.

We never spam your inbox. Unsubscribe at anytime.

WPYard

Web Developer since 2013. Blogging since 2017, I like watching movies in my free time. Traveling around the world is my next dream and I am looking for an opportunity to start my travel journey in the right direction.

Leave a Reply

Close Menu