The Gmail SMTP server is the outbound mail submission service used when clients or applications send mail through Gmail or Google Workspace accounts. In practice, teams usually care about the server hostname, port, TLS mode, and authentication method.

If you are searching for , , or , use this page as the practical setup and troubleshooting guide.

Quick answer

The Gmail SMTP setup most people look for is:

  • hostname:
  • common ports: or
  • TLS required
  • authentication required

The exact auth method depends on whether the account uses app passwords, modern account security, or a more API-driven Google integration pattern.

Gmail SMTP settings overview

SettingTypical value
SMTP server
Port or
EncryptionSSL/TLS or STARTTLS depending on port
UsernameFull Gmail or Workspace email address
PasswordAccount password or app password depending on account security model

These values are only part of the story. Most Gmail SMTP issues come from auth or account policy, not from the hostname alone.

Example Gmail SMTP client configuration

Most clients will ask for:

  • full Gmail or Workspace email address
  • SMTP host
  • port or
  • TLS mode that matches that port
  • password or app-password path supported by the account

If one of those assumptions is wrong, the login error usually looks more generic than the real cause.

Which Gmail SMTP port should you use?

Port

Usually used for implicit TLS.

Port

Usually used for SMTP submission with STARTTLS.

The important point is not choosing a "magic" port. It is matching the port to the client's TLS behavior. Port and encryption mismatches often look like credential failures.

Gmail SMTP authentication realities

Modern Gmail and Workspace setups are more restrictive than older tutorials imply.

Common realities:

  • plain old "less secure app" assumptions are unreliable or obsolete
  • app-password workflows may be required in some account configurations
  • account-level security settings can block otherwise valid SMTP credentials

This is why many teams eventually move some workflows to a Google API model or to a transactional email provider instead of relying on Gmail SMTP for everything.

Common Gmail SMTP failures

Authentication failure

Usually caused by:

  • wrong password
  • missing app-password configuration
  • blocked login policy
  • using the wrong account identity

Connection failure

Usually caused by:

  • wrong port
  • wrong TLS mode
  • blocked outbound network path
  • local firewall or client restrictions

Message accepted but workflow still weak

Even if Gmail SMTP accepts a message, the workflow may still be fragile if you do not validate headers, delivery, and receive-side behavior.

Gmail SMTP error table

SymptomLikely causeFirst check
Auth failedApp-password or account-policy issueAccount security settings
Could not connectWrong port or TLS modePort and encryption pairing
Works in one client, not anotherClient auth assumptions differCompare account and client settings
Mail sends but is unreliable for product flowsSMTP path lacks operational controlsConsider API or transactional mail path

Gmail SMTP vs Gmail API

Gmail SMTP is useful when:

  • you need standard SMTP client compatibility
  • the stack already expects SMTP
  • you want simple client configuration

Gmail API is often better when:

  • you need stronger application-level control
  • you want structured integration behavior
  • you are automating message creation or mailbox operations

Relevant pages:

Gmail SMTP in testing workflows

If you are validating application mail, do not stop at "SMTP login works."

Also verify:

  • the message was actually sent
  • headers look correct
  • auth results are healthy
  • links and OTP codes are usable

Useful related pages:

Troubleshooting checklist

  1. confirm
  2. confirm port and TLS mode match
  3. verify which auth method the account requires
  4. test with a clean client profile
  5. inspect errors and resulting message headers
  6. decide whether SMTP is still the right integration path

Use MailSlurp for Gmail SMTP testing

MailSlurp helps teams validate SMTP behavior with SMTP tester, inspect auth and route details using Email header analyzer, and run broader workflow checks in Email sandbox. Create a free account at app.mailslurp.com if you need Gmail-related send paths tested before release.

FAQ

What is the Gmail SMTP server?

It is Google's SMTP submission endpoint used for sending mail from Gmail or Google Workspace accounts.

What port does Gmail SMTP use?

Usually or , depending on TLS behavior.

Why does Gmail SMTP say login failed even when the password seems right?

Because account security policies, app-password requirements, or auth-mode mismatches are often the real cause.

Should teams use Gmail SMTP for production product mail?

Sometimes, but many product teams prefer a dedicated transactional mail system or API when they need stronger reliability and observability.

Final take

Gmail SMTP is simple enough to start with, but only if you respect the port, TLS, and auth details. For product-critical mail, evaluate whether SMTP compatibility is enough or whether a more controlled API workflow is the better long-term option.