1- Login to WordPress, Go to the Post SMTP tab in your WordPress dashboard and click the Start the Wizard button.
2- Enter the Google email address that will be used as your admin email for the website, and your company or website name in the Name field. Click the Next button.
3- The wizard should automatically set smtp.gmail.com as the Outgoing Mail Server Hostname.
Click the Next button.
4-The wizard will automatically recommend and select: SMTP-STARTTLS with OAuth 2.0 authentication to host smtp.gmail.com on port 587.
Then simply click Next.
5-In the Authentication screen, you will need to input two parameters: Client ID and Client Secret to configure it.
6- To get the Client ID and the Client Secret, visit Google API Console and log in to your Gmail Account if asked.
If it’s for the first time then you need to register your application for Gmail API, or simply Create a project and click Continue.
7- Next in the process is to create credentials for SMTP configuration. Select User data and click NEXT.
8- Then, provide the app information like your App Name, User Support Email, and Developer Email Address, and click SAVE AND CONTINUE.
9- You can skip the next step (Scopes) as it’s an optional step and continue with the OAuth Client ID, where you need to select Web application as the application type.
10- Scroll down the screen and click ADD URI.
11- Now, you have successfully completed all the steps. You can download your credentials if you wish. Click Done.
Now copy the Client ID and Client Secret and paste them into the plugin Setup Wizard (step 5).
Click Web Client 1 (OAuth name) to access your Client ID information.
12- Once you click on the name, you will find the Client ID and Client Secret of your Gmail account that you need to copy.
13- Next, you need to paste the Client ID and Client Secret to the plugin setup (step 8) and click Next.
14- Then, skip the notification step and finish the setup.
15- Before you grant permission to your account, change the publishing status from Testing to Publishing.
For that, go back to your Google console > OAuth consent screen > Publish App and click Confirm.
16- Now get back to your WordPress dashboard > Post SMTP Setup and click Grant permission with Google.
17- From the dialog box, select the Gmail account you want to use to send emails, and allow all the permissions.
18- To verify you configured everything correctly, just check that your status matches this one.
19-The last step is to check and verify that everything is working as expected.
Click Send a Test Email option from the Actions section and enter the destination email.