Documentation

✉️ Email Delivery

Documentation, reference material and tutorials for CRM-NG SMTP Email: setup guides for every mail service, troubleshooting, and one article per error message.

Google Workspace / Gmail

Updated

By Duane GarnerChief Executive Officer (CEO)
Summarize: Claude ChatGPT View Markdown
On this page

Connect CRM-NG SMTP to Gmail or Google Workspace with your own Google OAuth app, so your site sends through your Google account.

This guide shows you how to send your WordPress email through a Gmail or Google Workspace account. It suits small sites that send a modest number of messages and already use Google for email.

The Google / Gmail mailer uses the Gmail API through an OAuth app you create in the Google Cloud Console. It asks for one permission, gmail.send: the site can send mail but not read your inbox. Google returns straight to your own site; nothing passes through any other service.

Daily limits

Google caps how many messages an account may send each day. For newsletters or large batches, use a dedicated sending service. See Choosing a mail service.

Before you start

  • A Gmail address or a Google Workspace mailbox that will send the email.
  • Access to the Google Cloud Console with that account (for Workspace, your admin may need to allow you to create projects).
  • Administrator access to your WordPress site, and your site served over HTTPS.

The settings screen's Guided Gmail Setup list links to each Google page used below.

Step 1: Create the Google Cloud project and enable the Gmail API

  1. Open the Google Cloud Console

    Go to https://console.cloud.google.com/ and sign in with the Google account that owns the sending address.

  2. Create or pick a project

    Open the project picker at the top of the page and choose New project. Name it, for example "Website mail", and create it. Make sure the new project is selected before you go on.

  3. Enable the Gmail API

    Open APIs & Services → Library, search for "Gmail API", open it and press Enable.

Google now groups these pages under Google Auth Platform (older layouts call it OAuth consent screen). Look for the pages named Branding, Audience, Data Access and Clients.

  1. Start the consent screen

    Open Google Auth Platform → Branding and press Get started. Enter an app name (your site name is fine) and a support email address.

  2. Choose the audience

    On Google Workspace, pick Internal (only your organisation can use it, and Google does not review it). On a personal @gmail.com account, pick External.

  3. Add contact details and finish

    Enter a developer contact email, accept the policy and create the app.

  4. Add the gmail.send scope

    Open Data Access, press Add or remove scopes, find https://www.googleapis.com/auth/gmail.send, tick it and save. No other scope is needed.

  5. Publish an External app

    If you chose External, open Audience and press Publish app so its status reads In production. An app left in Testing issues sign-ins that expire after about seven days, and sending then stops.

Unverified app warning

An unreviewed External app shows a warning when you authorise it. As you are the only person signing in, continue with Advanced → Go to (app name). You do not need Google's review to send from your own account.

Step 3: Create the OAuth client

  1. Copy the redirect address from WordPress

    In WordPress, open CRM-NG SMTP → Settings → General, set Mailer to Google / Gmail, and copy the Authorized redirect URI with the copy button beside it (Copy URL to clipboard). It points to your own admin area.

  2. Create the client

    Back in Google, open Clients (or APIs & Services → Credentials → Create credentials → OAuth client ID) and choose the application type Web application.

  3. Paste the redirect address

    Under Authorized redirect URIs, press Add URI and paste the address exactly as copied. Leave Authorized JavaScript origins empty.

  4. Save and copy the keys

    Press Create and copy the Client ID and Client secret somewhere safe.

Step 4: Connect in CRM-NG SMTP

  1. Set your sender

    On CRM-NG SMTP → Settings → General, set From Email to the Gmail or Workspace address you are connecting (or a verified alias, see below) and set From Name. Tick Force From Email if other plugins keep changing the sender.

  2. Paste the keys

    Paste the value into Client ID and Client Secret.

  3. Save first

    Press Save Settings. Until you save, the Authorization row says "You need to save settings with Client ID and Client Secret before you can proceed."

  4. Authorise the account

    Press Allow plugin to send emails using your Google account. Google asks you to choose the account and approve sending. Approve it, and you return to the settings page.

  5. Check the connection

    The button changes to Remove OAuth Connection, sometimes with Connected as and your address.

Send-from alias

You can send as another address that belongs to your Google account, such as hello@yourdomain.com, as long as Gmail already accepts it as a "Send mail as" address.

  1. Add the alias in Gmail

    In Gmail, open the gear menu → See all settings → Accounts (on personal accounts the tab is Accounts and Import). Under Send mail as, choose Add another email address, enter the alias, and keep Treat as an alias ticked.

  2. Verify it

    Gmail sends a confirmation code or link to the alias address. Complete it. On Google Workspace, an admin may first need to add the address as an alternate email for your user in the Google Admin console.

  3. Use it in CRM-NG SMTP

    Set From Email on CRM-NG SMTP → Settings → General to the alias and press Save Settings.

  4. Allow several aliases

    To let different plugins send from different verified aliases, leave Force From Email unticked and set each plugin's sender to one of your aliases.

Who decides the From address

With send-only permission the plugin cannot read your alias list, so Gmail decides: a verified "Send mail as" address is kept, anything else becomes your main address. A test arriving from the main address means the alias is not verified yet.

Send a test email

Open CRM-NG SMTP → Tools → Email Test, enter your own address in Send To, and press Send Email. Open the message in Gmail, choose Show original, and check that SPF, DKIM and DMARC all say PASS. More detail: Sending a test email.

On your own domain, make sure your SPF record includes _spf.google.com and that DKIM is switched on in the Google Admin console. See Adding DNS records.

Troubleshooting

To start again or link another Google account, press Remove OAuth Connection and authorise again.

Go to Top