How to configure Gmail SMTP in Wordpress


1) Login to admin dashboard and install the plugins Post SMTP Mailer/Email Log

2) Click on Post SMTP at left menu bar 

3) Click Start the Wizard.

4) Enter your Gmail email address, click Next

5) As for Outgoing Mail Server Hostname should be auto generated >

Click Next

6) Ensure the Socket is selected as SMTP - and Authentication is selected as OAuth 2.0 (requires Client ID and Client Secret) then click Next.

7) Keep this Windows Open, as you will require to proceed later for the Authorized JavaScript origins and Authorize redirect URL

Steps of setting up your Google API:

  • Access via link below:

1) If you never setup Google API before kindly fill in the details below and click  Agree and continue.

2) Then it will bring you to this page. Choose on Create a project and click continue.

3) Proceed to click Go to credentials. 

4) Click on Client ID.

5) In this step, you will need to name your project, press Configure Consent Screen to proceed.

6) Directly click Create

7) Ensure the Application name has entered and email has selected to the gmail that you require to setup in WordPress.

8) Click on the Credentials > + CREATE CREDENTIALS > OAuth client ID

9) Kindly ensure the Application type* is select to Web application, Name* should be Mail Server Post Mail.

10) At the same page keep scrolling down and you will see these 2 field, click on + Add URL for both Authorized JavaScripts origin and Authorized redirect URls. 

Refer back to Step 7 for WordPress SMTP setup and copy and paste the 2 Authorized JavaScripts origin and Authorized redirect URls URL into the 2 fields below and click Create.

11) Once Created, a OAutho Client created window will pop up. Copy and paste the Your Client ID and Your Client Secret, paste it into step 7 for Wordpress SMTP. then click on Next in WordPress.

12) You are almost done. May click next Notifications.

13) Click Finish (IMPORTANT : Please ensure that mod sec is turn off else it will generate error when proceed)

14)  Last step, Click on  Grant permission with Google in WordPress and you are done!.

15) Would be best to send Test Email and you are good to go! Done !

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.