Fix WordPress not Sending Emails Problem Using Gmail SMTP

WordPress not Sending Emails
JavaScript for WordPress

In many cases, you may find your WordPress not sending emails such as registration emails, contact form 7 emails or you are getting a message like the following one when you try to recover your password.

The email could not be sent. Possible reason: your host may have disabled the mail() function

Why is WordPress not Sending Emails?

There are many factors that may cause the issue, but for the sake of making a short and quick guide, I will not dig into the technical stuff as it can be a real trick to trace down the real cause of the issue.

What is the fix?

You will need to use SMTP (Simple Mail Transfer Protocol) to send the emails in your WordPress installation.

What do you need?

– Gmail Account.
– SMTP Plugin. WP Mail SMTP or Easy WP SMTP. Screenshots in this post will be taken from Easy WP SMTP.

Install Easy WP SMTP

Navigate to Plugins -> Add New -> Search for Easy WP SMTP and install it.

install Easy WP SMTP

Navigate to Settings -> Easy WP SMTP

Easy WP SMTP settings

You can set it up as shown in the screenshot.
Please note that:
SMTP username: your Gmail username.
SMTP Password: your Gmail password.

Now, try to send a test email and it will NOT work! Why?

When you go to check your email, you’ll find a message from Google titled with Sign-in attempt prevented
Sign-in attempt prevented

It means that Google stopped the email from being sent from WordPress that tried to use your Gmail to send the email. The only way to fix this problem is to allow less secure apps (WordPress) to access your Gmail account. To do this, go to this page and choose “Turn on”.

Less secure apps

More info can be found here.

Conclusion

As mentioned in the title of this post, we are using Gmail SMTP to fix “WordPress not Sending Emails” problem. There are many alternative solid ways to send emails from your WordPress like Mailgun, Mandrill, etc..

GET MORE STUFF 
IN YOUR INBOX
WordPress Multilingual, Performance, SEO, Reviews and HOT Deals. One email per week!
Stay Updated
Give it a try, you can unsubscribe anytime.
Close
GET MORE STUFF
IN YOUR INBOX
WordPress Multilingual, Performance, SEO, Reviews and HOT Deals. One email per week!
Stay Updated
Give it a try, you can unsubscribe anytime.
We have created the 1st online directory for the Multilingual Themes
CLICK HERE

WE'RE SOCIAL!

Follow us on..