How to Set Up WP Mail SMTP with Gmail or Google Workspace

WP Mail SMTP is a powerful plugin that lets your website send emails using Gmail or Google Workspace, improving email reliability and deliverability.

Step 1: Install and Activate WP Mail SMTP

  1. Log in to your WordPress Dashboard.
  1. Go to Plugins > Add New.
  1. Search for “WP Mail SMTP”.
  1. Click Install Now, then click Activate. Once activated, you’ll see a new menu on the left called WP Mail SMTP.

Step 2: Choose Gmail as Your Mailer

  1. Go to WP Mail SMTP > Settings.
  1. Under the Mailer section, select Gmail.
  1. A new Gmail configuration form will appear below.

Step 3: Set Up Google API Credentials

To connect your Gmail account, you need to create a Google Cloud project and generate OAuth credentials.

  1. Go to Google Cloud Console. Log in using your Google account.
  1. Create a New Project. Click the Dashboard.
  1. Click New Project. Enter a name and click Create.
  1. Enable Gmail API. In the left menu, go to APIs & Services > Library.
  1. Search for Gmail API. Click it and hit Enable.
  1. Configure OAuth Consent Screen. Go to OAuth Consent Screen (under APIs & Services). Choose External.
  1. Fill in your app details:
    • App name, user support email, developer email. Save and continue.
  1. Create OAuth Credentials. Go to Credentials > Create Credentials > OAuth Client ID.
  1. Choose Web Application. Add a name like “WP Mail SMTP Integration”.
  1. Under Authorized Redirect URIs, paste this:

https://connect.wpmailsmtp.com/google/

  1. Click Create.
  1. Copy Your Credentials. Google will now show your Client ID and Client Secret. Keep these for the next step.

Step 4: Connect WP Mail SMTP to Google

  1. Go back to your WP Mail SMTP Settings.
  1. Under Gmail, paste in the Client ID and Client Secret.
  1. Click Save Settings.
  1. After saving, you’ll see a button that says Allow plugin to send emails using your Google account.
  1. Click it, log in to your Google account, and Allow Access.

Step 5: Send a Test Email

  1. Go to WP Mail SMTP > Tools > Email Test.
  1. Enter any email address you want to test.
  1. Click Send Email.
  1. Check your inbox to see if the test was successful.

Help Center

How can we help?

Table of Contents