The Gmail provider sends email through the Gmail API using OAuth 2.0. This means NimblyMail never stores your Google password — it holds only a temporary access token that Google can revoke at any time from your Google account settings.
This option works for both personal Gmail accounts and Google Workspace (formerly G Suite) accounts.

Prerequisites
- A Google account (Gmail or Google Workspace)
- Access to Google Cloud Console — a free Google account is sufficient
- The sending address must belong to the Google account you authorize
Setup
Navigate to WP Admin > NimblyMail > Settings > Connection > Gmail / Google Workspace.
Step 1 — Create a Google Cloud project
Open https://console.cloud.google.com/ and sign in with the Google account you want to send from.
Click the project selector at the top of the page and select New Project. Give it a name (e.g., My WordPress Site) and click Create. Wait for the project to be created, then make sure it is selected in the project selector.
Tip: If you already have a Google Cloud project you want to reuse, select it instead of creating a new one.
Step 2 — Enable the Gmail API
In the left sidebar go to APIs & Services > Library. Search for Gmail API and click on it. Click Enable.
Step 3 — Configure the OAuth consent screen
Before creating credentials, Google requires you to configure the consent screen that users see when authorizing access.
Go to APIs & Services > OAuth consent screen. Select External (or Internal if you are on Google Workspace and sending only from within your organization) and click Create.
Fill in the required fields:
- App name — any name, e.g., your site name
- User support email — your email address
- Developer contact information — your email address
Click Save and Continue through the remaining screens. You do not need to add scopes manually — NimblyMail requests them at authorization time.
If your app is in Testing mode, add your Google account email under Test users. You can publish the app later if needed, but testing mode is sufficient for a single-site deployment.
Step 4 — Create OAuth 2.0 credentials
Go to APIs & Services > Credentials and click + Create Credentials > OAuth client ID.
Set the Application type to Web application and give it a name.
Under Authorized redirect URIs, click + Add URI and paste in the redirect URI shown in your NimblyMail settings page. You will find this URI displayed in the Gmail section of WP Admin > NimblyMail > Settings > Connection — it looks like https://yoursite.com/?nimbly_mail_oauth=gmail.
Click Create. Google displays your Client ID and Client Secret — copy both values.
Warning: Do not close this dialog without copying the Client Secret. Google does not show it again after you close the window. If you lose it, you must create a new credential.
Step 5 — Enter credentials in NimblyMail
Back in WP Admin > NimblyMail > Settings > Connection > Gmail / Google Workspace, paste your Client ID and Client Secret into the corresponding fields. Click Save Settings.
Step 6 — Authorize the connection
Click Connect to Google. You are redirected to Google’s authorization screen. Sign in with the account you want to send from and grant the requested permissions.
After authorizing, Google redirects you back to the NimblyMail settings page. You will see a confirmation that the account is connected.
Step 7 — Test delivery
Navigate to WP Admin > NimblyMail > Tools > Email Tester and send a test email to confirm that messages are delivered correctly.
Field Reference
| Field | Description |
|---|---|
| Client ID | The OAuth client ID from Google Cloud Console. Stored encrypted. |
| Client Secret | The OAuth client secret from Google Cloud Console. Stored encrypted. |
| Connect to Google | Button that starts the OAuth authorization flow. Appears after credentials are saved. |
| Disconnect | Revokes the stored access token and clears the connection. Appears when an account is connected. |
Important Notes
Token refresh
Google access tokens expire after one hour. NimblyMail automatically refreshes them using the stored refresh token, so you do not need to re-authorize periodically.
Disconnecting
Clicking Disconnect removes the stored tokens from NimblyMail. The authorized app entry in your Google account at myaccount.google.com/permissions remains until you revoke it there manually.
Sending limits
Gmail accounts are limited to 500 emails per day. Google Workspace accounts are limited to 2,000 per day. If your site sends more than this, use Amazon SES, Resend, or SendLayer instead.
From address
The From address must be the Gmail or Google Workspace address you authorized. Google rejects messages sent with a From address that does not belong to the authorized account.
Constants (wp-config.php)
define( 'NIMBLY_MAIL_GMAIL_CLIENT_ID', 'your-client-id.apps.googleusercontent.com' );
define( 'NIMBLY_MAIL_GMAIL_CLIENT_SECRET', 'your-client-secret' );
Tip: Constants prevent credentials from being modified through the settings screen, which is useful on managed or multi-developer environments. The OAuth flow (authorization button) still runs through the settings screen regardless of whether constants are used.
