Do you want to use Gmail SMTP in WordPress?
Sending WordPress emails through Gmail helps to improve deliverability and stops your WordPress emails from going to spam. The WP Mail SMTP plugin has a setup wizard that makes it easy to connect your WordPress site to the Gmail API. We’ll show you how to do it in this article.
How to Send WordPress Emails Using Gmail SMTP with WP Mail SMTP
You can use WP Mail SMTP to link your WordPress email to Gmail via:
- Gmail SMTP details
- Google API
We highly recommend that you use the Google API. This method takes a little longer to set up, but it’s worth it for the extra security,
Before It must be really frustrating when you finally finished setting up Contact form 7 or other plugins and at last when you test it. It says, “There was an error trying to send your email”.
OR
Sends your email in spam. Well, we have got a solution for you today which will ensure that your contact form works fine and the email with data is suspected as spam. WP Mail SMTP shines like a candle in the darkness in these types of problems.
So let’s get to our main topic and set up WP Mail SMTP with Gmail mailer.
1. Install & Activate the plugin “WP Mail SMTP”.
2. Click on the WP Mail SMTP option in the dashboard.
3. Click on the setup wizard.
5. Then client id and client secret will be asked. For this go to https://console.cloud.google.com/
6. Log into your gmail account.
8. After creating a project go to API & Services. Inside go to OAuth Consent Screen.
9. Select the checkbox which says External
10. Enter your app name (you can enter any name), and give your email address in the fields marked with a red asterisk. Press Save and Continue.
11. Simply Save and Continue on the page related to Scopes.
12. Again just simply Save and Continue on the page related to Test Users.
14. Click on Create Credentials at the top then select OAuth Client ID
15. Click on Create Credentials at the top then select OAuth Client ID
16. Click on the add Url button in authorized redirect URIs and then paste this https://connect.wpmailsmtp.com/google/
17. Again go to OAuth Consent Screen & click on publish app
18. Then search Gmail API in the search bar & then click on enable button
19. Now, by clicking on the nav menu go to API & Services and Credentials
20. Under OAuth 2.0 Client IDs go to edit OAuth Client which is given by the pencil icon
21. Then from the upper right side of the page you will find your Client ID & Client Secret
22. Copy and paste it on the configure mail settings page in WP Mail SMTP
23. Now fill in the fields of from name & from email address. Click on Save & Continue
26. After successful setup then send a test email to and desired email & Now your WP Mail SMTP is successfully setup and Now your contact form 7 will work properly