How to use Gmail as an SMTP server without OAuth

Gmail’s SMTP server (smtp.gmail.com) accepts two authentication methods: OAuth 2.0 and Less Secure App (LSA) access was Google's name for the third-party authentication path that used a plain account password against Gmail's SMTP, IMAP, and POP endpoints. Google shut it down for consumer accounts on 30 May 2022 and for Workspace accounts on 1 May 2025; OAuth, App Passwords, or a different sending provider replace it. Read full reference →. Gmail SMTP always requires authentication; the question is which method. Google recommends “Sign in with Google” where an app offers it, and discourages App Passwords. An App Password is a 16-character credential issued by Google that works in any mailer plugin with SMTP host, username and password fields. The Gmail OAuth mailers in WP Mail SMTP, FluentSMTP and Post SMTP do not use smtp.gmail.com at all; they send through the Gmail API. For the comparison between the two methods, see Gmail OAuth vs App Passwords.

This guide is for WordPress sites configuring Gmail SMTP through a mailer plugin (FluentSMTP, WP Mail SMTP, Post SMTP, and similar). The credentials are SMTP-standard and work with any client; the rest assumes the WordPress context.

Prerequisites

2-Step Verification (2SV) must be enabled on the Google account. Without it, the App Passwords option does not appear in Google account settings and there is no way to generate a credential. Enable 2SV at myaccount.google.com/security before generating an app password. This applies to both personal Gmail and Google Workspace.

On Google Workspace, an organisation that enforces security keys for 2SV cannot also let its users sign in with App Passwords. If the App Passwords option is missing although 2SV is on, ask the Workspace admin about that, then check the other cases where the option is missing.

Generate the App Password

Follow How to set up App Passwords in Gmail for the step-by-step. Two operational details:

  • The 16-character password is shown once. Copy it before closing the dialog; there is no recovery.
  • Google strips the spaces from display but the password itself is just the 16 characters. Most plugins accept it either way.

Gmail SMTP settings

These are the values to enter in the WordPress mailer plugin’s SMTP configuration:

Setting Value
SMTP host smtp.gmail.com
Port 587 (STARTTLS) or 465 (SSL)
Encryption STARTTLS for port 587, SSL/TLS for port 465
Authentication Required
Username The full Gmail address ([email protected] or [email protected] for Workspace)
Password The 16-character App Password
From address Must match the authenticating Gmail account (see below)

Either port works. Port 587 with STARTTLS is the modern default; port 465 with implicit SSL is still supported. Neither of these two submission ports is port 25, so a host that blocks only port 25 does not stop Gmail SMTP. Some hosts block the submission ports too: DigitalOcean blocks 25, 465 and 587 on Droplets. If neither port connects, ask the host which outbound ports it allows, or use a mailer configured for the Gmail API, which sends over HTTPS instead of SMTP and does not rely on SMTP submission ports.

The From address constraint

In Gmail, Google documents sending from the account address or a verified “Send mail as” address (Google). If WordPress is configured to send as [email protected] but the authenticated user is [email protected], Gmail has no record of that From address unless the account has added it as a “Send mail as” address. What happens to the From then depends on the path:

  1. Through smtp.gmail.com with an App Password: Google’s Gmail Help, SMTP documentation, Gmail API sending guide, and API references for sending and send-as addresses do not specify what Gmail does with an unlisted From address.
  2. Through a Gmail API (OAuth) mailer, the plugin decides. WP Mail SMTP 4.10.5 replaces the From and the envelope sender with the account’s Gmail address when the From is not on the account’s send-as list. FluentSMTP 2.4.5 and Post SMTP 4.0.4 send the message to the Gmail API unchanged. nanoPost read this in each plugin’s code; it was not tested in a Google account.

When the From ends up as [email protected], recipients see your Gmail address, not your domain, and replies go to Gmail unless the message sets a Reply-To. Authentication is not what breaks: with a gmail.com From, receiving servers evaluate DMARC for gmail.com, not for yourdomain.com. For a Workspace account on your own domain, this mismatch does not arise when the From is the account’s primary address or a configured “Send mail as” address.

If you need to send from your custom domain but route through Google, the supported paths are:

  • A Google Workspace account on your domain (the right answer for most cases).
  • A dedicated transactional service like Amazon SES, Postmark, or Brevo (see the sending services directory).

A “Send mail as” address in personal Gmail is left off that list. Google will remove “Send as” for third-party email addresses in Gmail on the web and mobile apps in January 2027; its announcement does not say whether this changes sending through a WordPress SMTP or Gmail API mailer (Google, read 2026-11-29). Google’s examples are @hotmail.com and @yahoo.com, and its page does not mention custom domains; in nanoPost’s reading, an address on your own domain that Google does not host counts as a non-Google account. Gmail-to-Gmail aliases and Google Workspace “Send as” are not affected. For a domain that forwards into personal Gmail, see Gmail is ending Send mail as for third-party addresses.

Personal Gmail handles low-volume WordPress notifications sent from a Gmail address. It does not replace a transactional service on a custom domain.

Daily sending limits

Both Gmail tiers cap outbound mail per 24-hour rolling window:

  • Personal Gmail: 500 messages per day, or 500 recipients in a single message (Gmail help).
  • Google Workspace (authenticated SMTP via smtp.gmail.com with an App Password): on a paid account, 2,000 messages per day per user, up to 3,000 external recipients per day, and a hard cap of 500 external recipients per message (Gmail sending limits in Google Workspace). A trial account gets 500 messages and 500 unique external recipients a day, and Google raises a new account’s limits only after the domain has cumulatively paid $100 USD.

The Workspace SMTP relay service is a separate path with its own 10,000-recipient-per-day cap and IP-allowlist authentication; it is not what this guide configures. If you are using smtp.gmail.com with an App Password from a WordPress plugin, the authenticated-SMTP limits above are the ones that apply.

Hitting the limit returns a temporary error and sending is restricted for 1 to 24 hours. For most WordPress sites this is not a constraint, but a WooCommerce store sending order confirmations on a busy day, or a site whose contact form is being hammered by spam, will hit it. If you are designing for any volume, route through a transactional service instead.

Common errors

Google’s list of Gmail SMTP errors gives the two login replies as 535 5.7.80 and 534 5.7.90. In error messages that users have posted, they appear as 535-5.7.8 and 534-5.7.9, the form used below.

  • 535-5.7.8 Username and Password not accepted: wrong password, or an App Password that no longer works. Regenerate the App Password and retry. If the error persists, check that 2SV is still enabled and, on Workspace, that the organisation does not enforce security keys.
  • 534-5.7.9 Application-specific password required: Google’s list says this reply means an application-specific password is required. Check that the plugin is configured with a valid App Password.
  • Authentication succeeds but messages do not arrive: usually a From/Reply-To mismatch or DMARC failure at the recipient. Check your SMTP plugin’s log for the Gmail response, then check the receiving domain’s published DMARC policy.

When to stop using this approach

App Passwords work today, but Google discourages them, and a change to the Google account password revokes them. For any WordPress site where mail delivery matters (commerce, account recovery, anything not optional), a dedicated transactional service with its own SMTP credentials is the durable choice. App Passwords for Gmail SMTP remain a working option for sites with low send volume, single-account-owner accountability, and no requirement to send from a custom domain.

Corrections
  • 2026-12-03: an earlier version said a 534 5.7.90 reply means the plugin is logging in with the account’s main password. Google’s list says only that an application-specific password is required; it does not say which credential was sent.
  • 2026-11-29: an earlier version listed a “Send mail as” alias in personal Gmail as a supported way to send from a custom domain. Google says it will remove “Send as” for third-party addresses in Gmail on the web and mobile apps in January 2027; its announcement does not say whether this changes sending through WordPress SMTP or the Gmail API. The earlier version also stated as fact that Gmail rewrites an unlisted From to the Gmail address; Google’s documentation does not say what Gmail does with it. It also said a rewritten From fails DMARC for your domain. With a gmail.com From, DMARC is evaluated for gmail.com; the rewrite changes the sender identity and where replies go.
  • 2026-11-26: an earlier version said blocking outbound port 25 is the common case on shared hosting, with no source covering those hosts. It also said 587 and 465 work wherever port 25 is blocked; DigitalOcean blocks all three on Droplets.
  • 2026-11-25: an earlier version said a Workspace administrator can disable App Passwords for the organisation. Google documents that enforcing security keys disables them. It also called OAuth Google’s preferred path for new integrations, and said many WordPress SMTP plugins support OAuth only for Workspace accounts.
  • 2026-11-09: an earlier version gave every Google Workspace account a 2,000-a-day sending limit. A Workspace trial gets 500 a day, and Google raises a new account’s limits only after the domain has cumulatively paid $100 USD.