Skip to main content

Gmail SMTP settings and test

Send through Gmail with smtp.gmail.com on port 587 and an app password. Enter your details below to test the login and send a real email.

Gmail SMTP settings

SMTP serversmtp.gmail.com
Port587 (STARTTLS) or 465 (SSL/TLS)
UsernameYour full Gmail or Workspace address
Password16-character app password
AuthenticationRequired

Test Gmail SMTP

The server and port are filled in. Add your Gmail address, an app password and a recipient. If it fails, you'll see Google's reply and what to change.

Your password is used for this one test and never stored or logged. We send one fixed test message; you can't change its content.

What this checks

  1. 1. Connect to server
  2. 2. Secure connection (TLS)
  3. 3. Log in
  4. 4. Send test email

If a step fails you get the server's exact reply and what it usually means.

How to create a Gmail app password

  1. Turn on 2-Step Verification at myaccount.google.com → Security. App passwords are only available with it on.
  2. Open myaccount.google.com/apppasswords, type a name such as "SMTP" and click Create.
  3. Copy the 16-character password. Google shows it only once. Use it as the SMTP password, with or without the spaces.
  4. Delete it from the same page when you no longer need it. Deleting it doesn't affect your normal sign-in.

On a Google Workspace account the admin can turn app passwords off. If the page says app passwords aren't available, ask your admin, or use smtp-relay.gmail.com, which Workspace admins can set up to accept mail by IP address.

Port 587 or 465?

Both work with Gmail. Port 587 starts plain and upgrades with STARTTLS; port 465 is encrypted from the first byte (SSL/TLS). Pick whichever your app supports, but match the security setting to the port: SSL/TLS on 587 or STARTTLS on 465 fails before login. Port 25 also exists on smtp.gmail.com, but most networks and cloud hosts block it. See what SSL email is for the difference.

Common Gmail SMTP errors

  • 534 5.7.9 Application-specific password required: use an app password instead of your account password.
  • 535 5.7.8 Username and Password not accepted: wrong username or app password. Use the full address and create a fresh app password.
  • Connection timed out: the port is blocked on your network, or SSL/TLS is set on port 587. Try 465 with SSL/TLS.
  • 550 5.4.5 Daily user sending quota exceeded: you hit Google's daily limit. Sending unlocks within 24 hours.

Sending from a custom domain through Google Workspace? If recipients see "via gappssmtp.com", your domain has no DKIM key. Check your domain.

FAQ

What is the Gmail SMTP server?
smtp.gmail.com. Use port 587 with STARTTLS or port 465 with SSL/TLS, your full Gmail address as the username and an app password as the password.
Can I use my normal Gmail password for SMTP?
No. Google no longer lets mail apps sign in with your normal password. Turn on 2-Step Verification, then create an app password at myaccount.google.com/apppasswords and use that instead.
Why does it say "the connection to the outgoing server smtp.gmail.com failed"?
This is the iPhone and iPad Mail error when sending through Gmail fails. The usual causes are a normal password instead of an app password, SSL turned off, or the wrong port. Check the outgoing server settings under Settings > Mail > Accounts, or run the test on this page to see the exact server reply.
What does "534 5.7.9 Application-specific password required" mean?
Your account has 2-Step Verification on, so Gmail wants an app password, not your account password. Create one and use it in the password field.
What does "535 5.7.8 Username and Password not accepted" mean?
The username or app password is wrong. Use the full address as the username and paste the 16-character app password without spaces. If you just created it, try a new one: each app password is shown only once.
How many emails can I send through Gmail SMTP?
Google limits a personal Gmail account to about 500 recipients a day and a Workspace account to about 2,000. Going over locks sending for up to 24 hours. For newsletters or app email, use a sending service instead.