Gmail SMTP and WordPress setup, error Free

0
118

This tutorial will show you how to set up WordPress to send emails via Gmail SMTP, error free.
Yesterday I realized that my website contact form is not sending emails. I realized the same problem on few other websites. I am using Gmail smtp on all of them, so I figured there must be something I did.

I sad:”Not a big problem, I can fix this before you can finish your breakfast and take a few minutes in the restroom. I was wrong.
But, “Why would I be wrong, I connected Gmail SMTP easily 100 times. Why would this time be any different”, right?

I knew Google changed a few things recently .. and after few hours of revisiting my oAuth consent screens on different accounts, Credentials… trying with too many combinations of data, I realized I will always fail. So,… I decided to do a research.
What I did, I checked all documentations, played many videos on you tube, read dozens of articles, and yet I did nothing right.
Why my smtp on WordpPress is not working???
I don’t know why nor how exactly, but now my emails work. The extra thing I did, which in my belief is what fixed everything:
DELETE the old oAuth consent screens and connected credentials, if any.

Detailed steps to Follow:

  1. Visit your cloud APIs dashboard and Login to your Google account which will be used to send an email: https://console.cloud.google.com/apis/dashboard
  2. Create a new project or use the default one if any.
  3. I use Gmail SMTP plugin, so instead of copy-paste instructions, here is the link to their tutorial: https://wphowto.net/gmail-smtp-plugin-for-wordpress-1341
  4. AN extra thing I did, was “Domain verifications”, meaning I added all my websites and verified under Search Console of this account. I think you don’t have to, but just in case.
  5. The FINAL thing to do is DELETE any previous oAuth consent screens and their Credentials. The SMTP might not work even if everything is setup properly.
    It is very strange step, but in my case, and probably in many other scenarios, necessary.
  6. Test your contact form

All Done!

Leave a reply

Please enter your comment!
Please enter your name here