Nemvo Email

By Fredrik Poller

0+ active installationsVersion 1.0.4

Send all WordPress email through Google Workspace or Gmail with OAuth. Guided setup, a delivery log with statistics, and SPF, DKIM and DMARC checks.

Description

WordPress sends email from the web server, and email from web servers often lands in spam or never arrives. Nemvo Email sends every message through your Google Workspace (or Gmail) account instead, with the Gmail API, so it leaves from Google’s servers, signed for your domain.

It replaces nothing you use: every plugin that sends email through wp_mail() (WooCommerce, contact forms, membership plugins, WordPress itself) keeps working and goes through Google.

Set up in a few minutes, with a guide

A step-by-step guide takes you through it: create an OAuth client in Google Cloud (with direct links and the exact redirect URI to paste), sign in with Google, choose the sender, send a test email, and check your domain’s DNS. Every step says what to click and what to do when Google shows an error.

Coming from WP Mail SMTP? The guide offers to import its settings, including a working Gmail connection, so you can skip the Google Cloud steps.

Delivery log and statistics

  • Every message is logged: recipients, subject, which plugin or theme sent it, how it was sent, and Gmail’s message id or the exact error.
  • The overview shows sent and failed messages over time, the delivery rate, which plugins send the most, the most common types of email, recipient domains and the most frequent problems. Everything is clickable and opens the matching messages in the log.
  • Search and filter the log. Optionally keep the content of messages to read them (in a sandbox) and send them again.
  • Google’s daily sending limit, and how much of it you used in the last 24 hours.

SPF, DKIM and DMARC, explained

Receivers check three DNS records to tell your email from forgeries. The domain check looks them up and tells you, for each, whether it’s right for Google, and if not, exactly what to publish, with copy buttons:

  • SPF: evaluated the way receiving servers do, for Google’s real mail servers (IPv4 and IPv6), so include:, redirect=, macros and flattened records all work. It reports missing or duplicate records, records that leave out Google (or only its IPv6 servers), more than 10 DNS lookups, and +all. Records served dynamically by a managed SPF service count as fine, with a note that they can’t be fully checked.
  • DKIM: missing (with the steps in the Google Admin console), revoked, or a 1024-bit key. Set the selector Google signs with right on the DKIM line (several are fine); when the configured one has no key, common selectors that do are suggested.
  • DMARC: missing, invalid, and, most importantly, whether your email will actually pass it, with strict alignment (aspf=s, adkim=s) taken into account: sending as an alias in another domain without DKIM fails, and with p=reject that means your email is rejected.
  • MX: where replies go. It also names your DNS host (Cloudflare, GoDaddy, Route 53 and many others), so you know where to make the change.

The check runs again every day, and Site Health warns you when something changes.

Minimal and safe

  • Asks Google only for permission to send email (“gmail.send”), never to read it.
  • Uses your own OAuth client: nothing passes through a third party’s server.
  • Tokens and the client secret are encrypted with keys from wp-config.php, so a copy of the database alone can’t be used.
  • When Google stops accepting the connection (removed access, changed password), every admin screen says so, with a button to fix it. A daily check finds it before an important email fails.
  • Sender rules for Gmail: other senders set by plugins (a contact form using the visitor’s address) are replaced by yours, and the visitor becomes the Reply-To.
  • Pause sending for staging copies of a live site, with a setting or the NEMVO_EMAIL_PAUSE constant.
  • No tracking pixels, no link tracking, no templates: messages go out exactly as WordPress built them.

For developers

  • Every wp_mail() filter and action keeps working, including phpmailer_init, wp_mail_succeeded and wp_mail_failed.
  • Actions nemvo_email_sent, nemvo_email_failed and nemvo_email_paused; filter nemvo_email_log_entry.
  • WP-CLI: wp nemvo-email status | test | dns | log | import | purge.
  • Configuration through wp-config.php constants or environment variables: NEMVO_EMAIL_GOOGLE_CLIENT_ID, NEMVO_EMAIL_GOOGLE_CLIENT_SECRET, NEMVO_EMAIL_KEY, NEMVO_EMAIL_PAUSE (with _FILE variants for Docker secrets).

Source code and issue tracker: github.com/nemvoit/nemvo-email.

External services

This plugin connects to Google to send the site’s email, once an administrator connects a Google account. Until then it contacts no outside service; the domain check below only looks up DNS records.

Google OAuth 2.0 (accounts.google.com, oauth2.googleapis.com): Google’s sign-in and authorization service.

  • When an administrator clicks “Sign in with Google”, the browser goes to Google’s consent screen (accounts.google.com) with the OAuth client ID and the requested permissions.
  • Right after that, the site exchanges the authorization for tokens (oauth2.googleapis.com/token), sending the OAuth client ID and secret, the authorization code and a one-time verifier.
  • The site refreshes its access token (oauth2.googleapis.com/token), sending the client ID, the client secret and the refresh token: about once an hour while email is being sent; once a day in the connection check (WP-Cron); when an administrator clicks “Check connection” or imports a connection from WP Mail SMTP.
  • The site sends the token to oauth2.googleapis.com/revoke to revoke it when an administrator disconnects, when Google grants less than the permission to send, and when the plugin is deleted (unless the authorization was imported from WP Mail SMTP and that plugin is still active).

Gmail API (gmail.googleapis.com): Google’s API for sending email from a Gmail or Google Workspace account.

  • Every email WordPress sends, including test emails and messages resent from the log, is uploaded with its recipients, headers, content and attachments, and Gmail delivers it from the connected account.
  • The daily connection check (WP-Cron), “Check connection” and importing from WP Mail SMTP make one empty request to the send endpoint, which sends nothing; it only shows whether Google accepts the connection.

Google’s Terms of Service, Google APIs Terms of Service, Privacy Policy and API Services User Data Policy apply.

DNS (the domain check): records are looked up through the server’s own resolver with PHP’s dns_get_record(), not through a web service. Only domain names are sent to the resolver, which may ask the name servers of those domains.

  • When: after an administrator connects an account or saves a sender in a new domain, when the setup guide opens and the sender’s domain hasn’t been checked yet, when an administrator checks a domain (“Check again”, or another domain in the settings) or runs wp nemvo-email dns, and once a day for the sender’s domain (WP-Cron).
  • What: TXT, MX, NS, A and AAAA records of the sender’s domain (or the domain the administrator enters) and its parent domain, _dmarc. and <selector>._domainkey. names, up to 15 common DKIM selectors when the configured one has no key, and the names its SPF record points to (include:, redirect=, a, mx, exists:), which are often outside the site’s domain (for example _spf.google.com).

Links to Google Cloud console, the Google Admin console and Gmail are only opened when an administrator clicks them. Nothing is sent anywhere else.

Third-party code

  • Chart.js 4.6.1, MIT, source https://github.com/chartjs/Chart.js/tree/v4.6.1 (the minified dist/chart.umd.min.js of the npm package https://www.npmjs.com/package/chart.js/v/4.6.1), bundled unmodified in assets/vendor/chart/ with its license (see assets/vendor/README.txt), so browsers load nothing from a CDN.

Installation

  1. Install and activate the plugin. Until you connect an account, WordPress keeps sending email the way it did, and the log already shows what it sends.
  2. Open Email › Set up and follow the guide. You need a Google Workspace account (or a Gmail account) and access to Google Cloud. If WP Mail SMTP’s Gmail mailer is set up, import it instead.
  3. Publish the DNS records the domain check suggests, if any.
  4. Deactivate any other email plugin (SMTP plugins included).

FAQ

Why do I need my own OAuth client in Google Cloud?

So that your email goes from your site straight to Google, and nobody else holds a key to your mailbox. It is free and done once; the guide shows every click. A shared client run by a plugin vendor would mean a third party’s server in the middle.

Can it read my email?

No. It asks Google only for the “gmail.send” permission (“Send email on your behalf”), plus your address. It can’t read, change or delete messages.

Does it work with a personal Gmail account?

Yes. Create the consent screen with the audience “External” and publish it (in “Testing” the connection stops after 7 days). Google shows an “unverified app” warning when you connect; it’s your own app, so click Advanced and continue. Gmail accounts may send 500 messages a day, Google Workspace accounts 2,000.

Which From address can I use?

The connected account, or any of its “Send mail as” addresses, aliases or groups it may send as. Gmail replaces any other address with the account’s own. By default, senders set by plugins are replaced by yours and become the Reply-To, so a contact form reply still goes to the visitor.

What if Google stops accepting the connection?

When access is removed from the Google account, the password changes, or the app is still in “Testing”, Google refuses the connection. Messages fail and are logged with the reason, every admin screen shows a notice, and Site Health reports it. Click “Connect again” under Email › Settings. A daily check usually notices it before a message fails.

I use WP Mail SMTP. How do I switch?

Install Nemvo Email and open the setup guide: it offers to import WP Mail SMTP’s sender settings and, if you use its Gmail mailer with your own OAuth client, the connection itself. Then deactivate WP Mail SMTP (the guide has a button). WP Mail SMTP’s “One-Click Setup” uses its own app, which can’t be shared, so in that case you create an OAuth client in the guide.

Will a staging copy of my site send email to my customers?

Not if you add define( 'NEMVO_EMAIL_PAUSE', true ); to the staging site’s wp-config.php: messages are logged but not sent. Copies with different WordPress security keys can’t decrypt the Google connection either.

Where are the tokens stored, and how?

In the WordPress options table, encrypted with XSalsa20-Poly1305 (libsodium). The key comes from the WordPress salts in wp-config.php, or from NEMVO_EMAIL_KEY if you define it. Changing the salts means connecting again.

What does the log store?

Recipients, subject, sender, the plugin that sent the message, size, status and Gmail’s message id or error, for 90 days by default (1 to 3,650). The content is only kept if you turn that on. Tools › Export and Erase Personal Data cover the log.

Does it track opens or clicks?

No. Messages go out unchanged.

Can I use Microsoft 365 or another service?

Not yet: this version supports Google Workspace and Gmail. The plugin is built so other services can be added.

Screenshots

Changelog

1.0.4

  • First release in the WordPress.org plugin directory. No changes to the plugin itself.

1.0.3

  • Fixed: the statistics API accepts periods of at most 3,660 days (the longest log retention) and only real calendar dates.

1.0.2

  • Changed: REST hardening. Every route of the plugin’s REST API answers 401 or 403 before it looks at any parameter, and the routes are no longer listed in the public REST index.
  • Changed: the personal data export includes the recipients (To, Cc, Reply-To, and Bcc when it is the person’s own address), the sender’s name, what sent the message, attachment names and, when content is kept, the message text. Large exports are split into pages.
  • Changed: on multisite, uninstalling cleans up every site of the network (it stopped at 100), and the daily check is scheduled on every site of a network-activated plugin.
  • Changed: JavaScript names, the browser setting that remembers the theme and the settings forms use the full “nemvo_email” / “nemvoEmail” prefix. The theme you chose is kept.
  • Changed: Chart.js 4.6.1.
  • Changed: the readme describes every connection to Google and every DNS lookup in detail.
  • Removed: the demo data generator (wp nemvo-email seed) is no longer part of the plugin zip; it stays in the development copy.

1.0.1

  • Changed: SPF is evaluated the way receiving servers do, for Google’s mail servers over IPv4 and IPv6. Flattened records, records behind redirect= and records with macros are judged correctly; a record that covers only Google’s IPv4 servers gets a warning.
  • New: SPF records served dynamically by a managed SPF service show as fine, with a note that they can’t be fully checked from here.
  • New: the DKIM selector (or several) can be set on the DKIM line of the domain check, in the setup guide and in the settings. When the configured selector has no key, common selectors that have one are suggested. Pasting a whole record name works too.
  • New: DMARC’s strict alignment (aspf=s, adkim=s) is taken into account.
  • Fixed: checking another domain in the settings no longer replaces the result for the sending domain.

1.0.0

  • First release: sends all WordPress email through Google Workspace or Gmail with the Gmail API and OAuth, with a setup guide, a delivery log with statistics, SPF, DKIM and DMARC checks, import from WP Mail SMTP, Site Health checks and WP-CLI commands.