---
title: "How to Set Up SMTP Using Gmail SMTP in WordPress?"
url: https://nexterwp.com/docs/set-up-smtp-using-gmail-smtp-in-wordpress/
date: 2025-08-12
modified: 2026-08-18
author: "Aditya Sharma"
description: "Are your WordPress emails going to spam or not being delivered at all? By default, WordPress uses the PHP mail function to send emails — but many hosting providers don’t..."
image: https://nexterwp.com/wp-content/uploads/2025/08/How-to-Set-Up-SMTP-Using-Gmail-SMTP-in-WordPress-1024x538.jpg
word_count: 712
---

# How to Set Up SMTP Using Gmail SMTP in WordPress?

## Key Takeaways

- Nexter Extension (Free) sets up Gmail SMTP from WordPress Dashboard > Nexter > Extensions > Utilities, then the SMTP Email section opens the Gmail SMTP tab.
- Google Developers Console requires a new project, Gmail API enablement, and an OAuth consent screen before Gmail SMTP works with Nexter Extension.
- OAuth client setup uses Application type Web application, Authorised JavaScript origins, and an Authorised redirect URL copied from the Nexter Email SMTP pop-up.
- Nexter Extension authorizes Gmail after Client ID and Client Secret are entered, then a test email confirms the connection by sending to the entered email address.

Are your WordPress emails going to spam or not being delivered at all? By default, WordPress uses the PHP mail function to send emails — but many hosting providers don’t support it well. This often leads to important emails (like contact form messages, order confirmations, or password resets) ending up in spam folders or getting blocked completely. If you’re running a business or e-commerce site, this can be a serious issue.

Using Gmail SMTP (Simple Mail Transfer Protocol) is a reliable solution***. ***With the [Nexter Extension (Free)](https://wordpress.org/plugins/nexter-extension/) plugin, you can easily set up SMTP using Gmail SMTP. 

[LIVE EXTENSION LINK](https://nexterwp.com/nexter-extensions/email-smtp-for-wordpress/)

 

## How to Set Up Gmail SMTP with the Nexter Extension

https://www.youtube.com/watch?v=s0gDiK0RnsA

To set up Gmail SMTP with Nexter Extension, from the WordPress Dashboard, go to **Nexter **>** Extensions** > **Utilities**.

Then go to the **SMTP Email **section, enable the toggle and click on the gear icon (⚙).

![](https://nexterwp.com/wp-content/uploads/2025/08/enable-smtp-email-new.png)

It will open the SMTP Email pop-up, then go to the **Gmail SMTP** tab.

![](https://nexterwp.com/wp-content/uploads/2025/08/smtp-email-popup-new.png)

To use Gmail SMTP, you have to generate a client ID and a client secret.

### Generate Google Client ID and Client Secret

1. For this, you have to log in to your Google account and go to the [Google Developers Console](https://console.developers.google.com/).

2. If you don’t have any projects created, then click on the **CREATE PROJECT **link, but if you already have a project, then click on the current project name. It will open a pop-up, then click on the **New Project** link there.

![google-client-id-secret-1](https://nexterwp.com/wp-content/uploads/2025/08/google-client-id-secret-1.png)

3. On the next screen, add your **Project name** and click the **CREATE** button.

![google-client-id-secret-2](https://nexterwp.com/wp-content/uploads/2025/08/google-client-id-secret-2.png)

4. Once the project is created, a notification will show; click on the **Select Project** link there to switch to the new project.

![google-client-id-secret-3](https://nexterwp.com/wp-content/uploads/2025/08/google-client-id-secret-3.png)

5. Then go to the **Library** from the left sidebar.

![google-client-id-secret-4](https://nexterwp.com/wp-content/uploads/2025/08/google-client-id-secret-4.png)

6. Then search for “**Gmail API**”.

7. From the search result, click on the **Gmail API**.

8. On the next page, click the **Enable** button. 

9. After that, click on the **OAuth consent screen** from the left sidebar.

![google-client-id-secret-6](https://nexterwp.com/wp-content/uploads/2025/08/google-client-id-secret-6.png)

10 Then click on the **Get Started** button.

![google-client-id-secret-7](https://nexterwp.com/wp-content/uploads/2025/08/google-client-id-secret-7.png)

11. Then add your app information. Enter the app name and the user support email, then click on the **Next** button.

![google-client-id-secret-8](https://nexterwp.com/wp-content/uploads/2025/08/google-client-id-secret-8.png)

12. Then select the Audience as **External** and click on the **Next** button.

![google-client-id-secret-9](https://nexterwp.com/wp-content/uploads/2025/08/google-client-id-secret-9.png)

13. After that, add a contact email address and click on the **Next** button.

![google-client-id-secret-10](https://nexterwp.com/wp-content/uploads/2025/08/google-client-id-secret-10.png)

14. Then, check the Google API services user data policy and click on the **Continue** button.

Once done, click on the **Create** button.

![google-client-id-secret-11](https://nexterwp.com/wp-content/uploads/2025/08/google-client-id-secret-11.png)

15. On the next page, click on the **Create OAuth client** button.

![google-client-id-secret-12](https://nexterwp.com/wp-content/uploads/2025/08/google-client-id-secret-12.png)

16. Then, from the **Application type** dropdown, select **Web application**. 

You can keep the Name as it is.

17. After that, in the **Authorised JavaScript origins** section, click the **ADD URI** button and add your website URL – Example: *https://www.yourwebsite.com*.

18. Then, in the **Authorised redirect URLs **section, click on the **ADD URI** button, then go back to the Nexter Email SMTP popup and copy the Redirect URI and paste it here.

19. Once done, click on the **Done** button.

20. Now you’ll see the **Client ID** in a pop-up. You can copy it into a notepad and click on the **OK** button.

![google-client-id-secret-14](https://nexterwp.com/wp-content/uploads/2025/08/google-client-id-secret-14.png)

21. On the next screen, click on your client name.

![google-client-id-secret-15](https://nexterwp.com/wp-content/uploads/2025/08/google-client-id-secret-15.png)

22. On the next screen, you’ll see both Client ID and Client Secret. 

Copy both in a notepad.

![google-client-id-secret-16](https://nexterwp.com/wp-content/uploads/2025/08/google-client-id-secret-16.png)

### Set up Gmail SMTP with the Nexter Extension

1. Now, in the Nexter SMTP pop-up, add a sender email and name in the **From Email** and **From Name** fields.

2. Then add the Client ID and Client Secret in the **Client ID** and **Client Secret** fields.

3. After that, click on the **Authorize with Gmail** button.

![](https://nexterwp.com/wp-content/uploads/2025/08/add-client-id-client-secret-new.png)

4. It will open a pop-up, select the same Gmail account that you’ve used to create the app.

![gmail-smtp-connection-1](https://nexterwp.com/wp-content/uploads/2025/08/gmail-smtp-connection-1.png)

5. Then click on the **Continue** link to bypass the Google verification.

![gmail-smtp-connection-2](https://nexterwp.com/wp-content/uploads/2025/08/gmail-smtp-connection-2.png)

6. On the next screen, again click on the **Continue** button. 

![gmail-smtp-connection-3](https://nexterwp.com/wp-content/uploads/2025/08/gmail-smtp-connection-3.png)

7. Then, in the next screen, allow all permissions and click on the **Continue** button.

![gmail-smtp-connection-4](https://nexterwp.com/wp-content/uploads/2025/08/gmail-smtp-connection-4.png)

8. Now you’ll see your app has been authorized.

![](https://nexterwp.com/wp-content/uploads/2025/08/gmail-smtp-connection-5-new.png)

### Send Test Email

Once authorized, you’ll see a field to send a test email, add an email ID, and click on the **Send** button to verify the connection.

![](https://nexterwp.com/wp-content/uploads/2025/08/gmail-smtp-send-test-email-new.png)

You should receive a test email in your entered email address.

![gmail-smtp-test-email](https://nexterwp.com/wp-content/uploads/2025/08/gmail-smtp-test-email.png)

## Frequently Asked Questions

**Q: Why are WordPress emails going to spam when I use the default mail setup?**
A: WordPress uses the PHP mail function by default, and many hosting providers do not support it well. That is why contact form messages, order confirmations, and password resets can end up in spam or get blocked completely. Nexter Extension offers Gmail SMTP as a more reliable sending method, which is the point of this tutorial. For business or e-commerce sites, that reliability matters because failed email delivery can break basic site workflows.

**Q: What do I need before setting up Gmail SMTP in WordPress?**
A: The key requirement is a Google account plus access to the Google Developers Console, because Gmail SMTP in Nexter Extension uses a Client ID and Client Secret. You also need your website URL for the Authorized JavaScript origins field and the Redirect URI from the Nexter Email SMTP popup. Those two values are what connect Google’s OAuth setup back to your WordPress site.

**Q: How do I get a Client ID and Client Secret for Gmail SMTP?**
A: The setup starts in the Google Developers Console by creating or selecting a project, enabling Gmail API, and then creating an OAuth client for a Web application. During that flow, you add your website URL as an Authorized JavaScript origin and paste the Redirect URI from the Nexter Email SMTP popup into Authorized redirect URLs. Once the client is created, Google shows both the Client ID and Client Secret for you to copy into Nexter Extension.

**Q: What should I enter in the Gmail SMTP settings inside Nexter Extension?**
A: The SMTP Email popup needs your sender details first: From Email and From Name. After that, paste in the Client ID and Client Secret you generated from Google. Those values are what let Nexter Extension authorize Gmail as the mail sender instead of relying on PHP mail, which is often where delivery problems start.

**Q: Why does Google ask me to continue through verification during Gmail authorization?**
A: The authorization flow in this tutorial includes several Continue prompts after selecting the same Gmail account used to create the app. That is part of getting through Google’s verification screens so the app can be authorized. The practical tip is to stay with the same account throughout the process, because switching accounts would break the connection between the app you created and the Gmail account you are authorizing.

**Q: How do I confirm that Gmail SMTP is working after setup?**
A: The final check is sending a test email from the Nexter SMTP popup after authorization. Enter an email address in the test field and click Send, then verify that you receive it in that inbox. That test matters because it confirms both sides of the setup: Google authorization completed correctly and WordPress can actually deliver mail through Gmail SMTP instead of PHP mail.
