Provider setup

Gmail SMTP test tool — ports, App Passwords, and troubleshooting

Gmail SMTP test tool for smtp.gmail.com on port 587 or 465. Step-by-step App Password setup, STARTTLS, and how to read 535 authentication errors.

4 min read Credentials redacted No signup

Connection settings

Host
smtp.gmail.com
Port
587
Security
STARTTLS

Gmail's SMTP submission servers are at smtp.gmail.com, available on port 587 (STARTTLS) and port 465 (implicit TLS). Both are equally secure — 587 upgrades the connection after EHLO while 465 negotiates TLS immediately on connect.

Use your full @gmail.com (or Google Workspace) email address as the SMTP username. The "From" address must usually match the authenticated account or an alias configured in Gmail settings.

Recommended settings

Setting up an App Password

Google blocks basic password authentication for accounts with 2-Step Verification enabled. You must generate an App Password instead:

  1. Go to myaccount.google.com and sign in.
  2. Navigate to Security → 2-Step Verification (must already be enabled).
  3. Scroll to "App passwords" at the bottom.
  4. Select "Mail" as the app, choose a device name (it does not matter which), and click Generate.
  5. Google shows a 16-character password in groups of four. Copy it exactly — you will not see it again.
  6. Use this password (without spaces) as the SMTP password in SMTP Tester.

If you do not see the App passwords option, 2-Step Verification is either disabled or your Workspace admin has restricted App Password creation.

Testing with SMTP Tester

  1. Enter smtp.gmail.com as the host and select port 587.
  2. Security will auto-set to STARTTLS (or choose 465 with TLS).
  3. Enter your Gmail address as both the username and the "From" address.
  4. Paste your App Password into the password field.
  5. Set the "To" address — use the same address to send to yourself.
  6. Click Run. The live transcript shows every SMTP line: EHLO, STARTTLS upgrade, AUTH LOGIN, and the server's 235 response on success.

A 235 2.7.0 Accepted response means authentication passed. If you send a message, a 250 2.0.0 OK with a queue ID confirms Gmail accepted it for delivery.

Common errors

535 5.7.8 "Username and Password not accepted"

This is the most common Gmail SMTP error. Causes:

Fix: generate a fresh App Password, copy all 16 characters without spaces, and try again.

534 5.7.9 "Application-specific password required"

Same root cause as 535 — the account has 2-Step Verification but you provided the account password rather than an App Password.

Connection timeout

If the transcript shows no server greeting:

550 5.7.0 "Mail relay denied" or "Recipient address rejected"

Gmail SMTP is not an open relay. The authenticated account must be allowed to send to the chosen recipient. If you see relay errors, confirm the "From" address matches the authenticated account (or an alias) and that the recipient exists.

Google Workspace (formerly G Suite)

Google Workspace accounts use the same smtp.gmail.com host and ports. The username is your Workspace email address. Your admin may have configured:

For authenticated relay, use smtp-relay.gmail.com on port 587 with STARTTLS. The admin must whitelist the sending IP or domain in the Google Admin console under Apps → Google Workspace → Gmail → Routing → SMTP relay service.

Gmail sending limits

Gmail enforces daily sending limits:

Exceeding limits triggers a temporary lock — SMTP returns 421 4.7.0 Try again later. Wait 24 hours or use a dedicated transactional provider (SendGrid, Amazon SES, Postmark) for higher volumes.

Security notes

Try it on your own server

Run these settings against your SMTP server and watch the live, credential-redacted protocol transcript.

Open SMTP Tester