Fixed WordPress contact form not sending emails – Gmail workspace
Fixed WordPress contact form not sending emails – Gmail workspace account needed and we’ll use Fluent SMTP
First log in into our Gmail workspace account
then open a new tap on your browser and go to console.developers.google.com
This will redirect you to console.cloud.google.com
You see a welcoming message if this is your first time. Check mark the Terms of Service and click on Agree and continue

You should be able to see google cloud platform dashboard

On the right side click on create project

Or
Click on Select a Project

Click on new project

Type a new project name, it could be any thing you like, click on Create

new project you create should be automatically highlighted if it’s not make sure to switch to the name of your new project

Next click on Library

Type Gmail API

Choose Gmail API

Click on Enable

It should be now Enable

GO to Oauth consent screen

Click on External and click Create
Fill out info for your app name, User support email and Application home page

continue filling out info by clicking on add Domain and add yourdomain.com and an email for google to contact you if they need to, when done click save and continue

example

Scope, You don’t have to do anything, just scroll down and click save and continue

On Test Users, click on add users and add the email address that you will be using on your WordPress contact form to send emails

example, click add when done

Then click save and continue.
if you got this message, you put an email account that is not recognize by google workspace

I am not sure why but it was not allowing me to use an email alias. I had to used one of the google workspace primary accounts. That fixed the problem. With google workplace each user can have a primary account and 30 aliases.
anyway, lets continue
Once you add the Test Users, Go back to Dashboard

Click on Credentials

Click on create credentials then Oauth client ID

Select Application type and choose Desktop app

Choose a name, could be any name you want and click create

OAuth client created – A client ID and A client secret was created

Copy your client ID and your client secret and paste it on Fluent SMTP API Settings, Also put the email address on From Email that you used to create the credentials on workspace and put a name on From Name, Once all the info is filled out, click on Authenticate with google & get access Token

If you don’t have the plug installs yet, on WordPress dashboard just click on plugins, add and search for a plug in name Fluent SMTP and install it, below there a icon of how it looks like

Once you click on Authenticate with google & get access Token it will redirect you to google, sign it with your google workspace account that you used

Then it will ask you if you want to allow it or not, click on Allow

It will give you an Authorization code, copy the code

Paste the code on Access Token and click on Save Connection Settings

It’s Done, WOW

Click on Email Test and test the to see if it’s working

Now It’s really done and it’s working as intended

Now my rant
Guys it took me like 10 whole hours probably more to get this thing working. I try so many different things.
Seriously guys, the whole freaking day gone!
It could be quite frustrating when something breaks and you can’t figure out why.
But finally got it working.
So for now my recommendation is google workspace which is a paid email address and fluent SMTP WordPress plug in which is free.
I guess you can do it with a free Gmail account too.
But this is what worked for me.
So this Fixed WordPress contact form not sending emails
That’s it
Take a calculated risk.
Now, start and adjust as you go