Home/Transactional Email/SMTP ports/Gmail app password SMTP

Gmail app password SMTP

A Gmail app password is a 16-character credential generated for a single application, used in place of the account password when connecting to smtp.gmail.com. Google requires one because it blocks ordinary account passwords from third-party clients on accounts with two-step verification.

VerifiedBy Kam Low, Co-founder·Updated

Why an app password is required

Account passwords stopped working from third-party mail clients when Google removed what it called less secure app access. An SMTP client cannot complete a two-step verification challenge, so a second credential type was needed.

What an app password is and is not

one credential, two very different jobs
Property
App password
Account password
Works from an SMTP client
Yes
No, once 2-Step Verification is on
Authentication mechanism
Ordinary PLAIN or LOGIN
Same, but rejected
Scope
One application
The whole account
Revocation
Individually, containing a leak
Account-wide reset
The credential was designed for a mail app you use yourself. A system sending on its own from a consumer mailbox is the mismatch, and it is why this keeps getting harder.
One credential, two very different jobs
The fit
personal clienta mail app you use yourself
personal mailboxcorrect, works well
The mismatch
applicationa system sending on its own
consumer mailboxa personal credential used as production infrastructure
The credential was designed for the first row. The second row is why it keeps getting harder.

An app password solves that narrowly. It authenticates through the ordinary PLAIN or LOGIN mechanism, so no client changes are required, while remaining separate from the account password.

The security property that matters is revocation. Each app password is scoped to one application and can be revoked individually, so a leaked credential is contained rather than requiring an account-wide password change.

Enable two-step verification

App passwords are only available on accounts with two-step verification enabled. The option does not appear otherwise, which is the most common reason people cannot find it.

Turn it on in the Google Account security settings. For Workspace accounts, an administrator may control whether two-step verification and app passwords are available at all, so the option can be absent for policy reasons rather than configuration ones.

Generate the app password

Google documents the process under sign in with app passwords. Generating one produces a 16-character code shown once.

Name it for the application that will use it. That name is the only thing distinguishing entries later when deciding which to revoke.

Copy the code without spaces. Google displays it in four groups of four for readability, and the spaces are presentation rather than part of the credential.

Store it immediately in an environment variable or a secrets manager. The code cannot be retrieved after the dialog closes, only regenerated.

Configure the SMTP client

The server is smtp.gmail.com. Use port 587 with STARTTLS, or port 465 with implicit TLS, and match the port to the encryption mode rather than mixing them.

The username is the full Gmail address including the domain. The password is the 16-character app password rather than the account password.

Authentication happens after the connection is encrypted. A client attempting AUTH before completing STARTTLS on port 587 will be refused, which presents as a credential error rather than a sequencing one.

Limits and when this is the wrong approach

Gmail applies per-mailbox sending limits sized for a person, and Workspace applies its own quotas. Exceeding them results in temporary account blocks rather than a clear error at send time.

Mail sent this way authenticates as an individual mailbox, so it carries that account's reputation and shows that address as the sender. It cannot send as your domain unless the mailbox is on your domain, and even then the reputation is the mailbox's.

Google is also moving toward OAuth as the preferred mechanism, which makes an app password a bridge rather than a destination for anything long-lived.

For application mail the appropriate path is a submission service authenticating as a verified sending domain, ours verifies one in about a minute, which provides per-message delivery events, bounce classification and suppression handling that a mailbox does not.

Why the credential keeps getting harder

App passwords exist because a mail client cannot complete a second authentication factor, and providers were unwilling to keep accepting account passwords from clients that could not. The credential is a workaround for a protocol that predates the security model now wrapped around it.

The direction of travel is worth naming: every year the gap widens between what a consumer mailbox is designed for and what an application needs. Aggressive bot detection makes automated access harder by design, and an automated agent cannot hold its own mailbox on the major consumer platforms at all.

The pull toward Gmail is real. When George, our CEO, scanned all 443 brands (439 users) in our production database, 78% of users lived in a Google mailbox, 52% plain gmail.com signups plus 110 custom domains on Workspace MX.

That gap is why our own Gmail integration was deprecated in July 2026. Gmail remains a destination we coexist with, and mail for addresses we do not handle forwards on to Google Workspace, Outlook, Zoho or whatever a customer already runs, untouched. What we no longer do is treat a consumer mailbox as sending infrastructure.

For anyone weighing an app password against something else, the question is what the credential is for. Connecting a personal client to a personal mailbox is exactly what app passwords are for and they work well. Wiring an application to a consumer mailbox is using a personal credential as production infrastructure, and every hardening step a provider takes lands on you.

The practical tell is whether a human will be present when things change. App passwords survive account password changes and have to be revoked deliberately, so an application depending on one keeps working until somebody tidies up and then stops without warning.

Go deeper

First send in thirty seconds.

Simple pricing. Unlimited contacts.

Every plan includes full stack emailing: Flows, Newsletter Campaigns and Transactional Email, plus our NitroWheel LLM and all agent integrations (Claude, ChatGPT, Codex, Cursor and others). Pay for what you send, not who you store.

Free
$0
forever
  • Emails 8,000then 500/mo
  • Email types Transactional & Marketing
  • AI actions 20/mo
  • Contacts Free & Unlimited
  • Brands 3 · Custom domain 1
  • Seats 1
  • Recipients / rolling 24h 100–5,000
  • Email validation Prepaid only
Start free
Ultra
$100
per month
  • Emails 125,000/month
  • AI actions 5,000/mo
  • Brands 10 · Domains 10
  • Seats 10
  • Frontier AI Included
  • Dedicated IP Available
  • Recipients / rolling 24h 1,000–625,000
  • Email validation Prepaid only
Get started
Enterprise
$300
per month
  • AI actions Unlimited
  • Unlimited brands & domains Included
  • SSO / SAML Included
  • 99.9% SLA Included
  • Recipients / rolling 24h Contracted
  • Email validation Prepaid only
Get started

Daily allowances depend on your plan and sender standing. Strong list, domain and delivery evidence can raise standing, including on day one. Trusted receives the full plan allowance; available email credits, safety checks and delivery pacing still apply.

Free forever. No credit card required. See full comparison →