Gmail SMTP Settings
Gmail's outgoing mail server, port and encryption for any client or device — plus sending limits, and how to send from another address through Gmail.
Server settings
Gmail
- IMAP incoming SSL/TLS
- SMTP outgoing STARTTLS
- POP3 download SSL/TLS
imap.gmail.com
port 993
smtp.gmail.com
port 587
pop.gmail.com
port 995
- Authentication
- Use “Sign in with Google” (OAuth). Older clients without Google sign-in may require an app password from an eligible account with 2-Step Verification.
- IMAP access
- Always enabled for personal Gmail accounts; Workspace administrators may restrict it
- Alt SMTP port
- 465 with SSL/TLS
- Username
- Your complete Gmail address, such as name@gmail.com
- POP access
- Enable it first in Gmail under Settings → See all settings → Forwarding and POP/IMAP
SMTP is what your mail client, printer or script uses to send through Gmail. It is configured separately from the incoming connection, which is why an account can receive perfectly while every outgoing message sits in the outbox — only one half is wrong, and it is usually this one.
Gmail SMTP settings
Setting | Value |
|---|---|
Server |
|
Port | 587 (STARTTLS) or 465 (SSL/TLS) |
Authentication | Required |
Username | Your full Gmail address |
Password | App password, or sign in with Google |
If your client has an "outgoing server requires authentication" checkbox, tick it. Older software sometimes leaves it off by default, on the long-dead assumption that anyone on the network can be trusted.
For incoming mail, see our IMAP settings guide, or the combined settings guide for everything at once.
Your normal password will not work
This is the most common reason Gmail SMTP fails, and no amount of retyping fixes it.
Google no longer accepts ordinary passwords over SMTP. Your client either signs in through Google directly — the "Sign in with Google" flow — or you give it an app password generated specifically for it. App passwords require 2-Step Verification to be switched on first; our security guide covers the whole process.
The symptoms are distinctive: the error 535 5.7.8 Username and Password not accepted, or a password prompt that reappears no matter how carefully you type. The test for which route you need is simple — a compatible client sends you to a Google sign-in page in a browser window. One that asks for your password in its own dialogue box needs an app password.
Choosing a port
Port 587 with STARTTLS is the modern standard. The connection opens unencrypted and immediately upgrades to TLS before any credentials are exchanged, so nothing sensitive crosses the network in the clear.
Port 465 with SSL/TLS encrypts from the first byte. Both are secure; the choice usually comes down to which your software handles more gracefully. If one refuses to connect, try the other before assuming the credentials are wrong.
Port 25 is not for mail clients. It exists for server-to-server delivery, and virtually every home broadband provider, mobile network and hotel connection blocks it to limit spam. Any guide still recommending port 25 for a desktop client is out of date.
Sending from another address
A lot of people looking for Gmail's SMTP server actually want something slightly different: to send mail from a different address — one on their own domain, say — while reading and writing in Gmail.
Gmail supports this directly, without configuring anything on your side. In Gmail's settings, under Accounts and Import, the Send mail as section lets you add another address. Gmail verifies you control it, then offers it in the From dropdown when composing.
This is usually better than pointing a mail client at Gmail's SMTP server, because replies behave correctly and the address is available everywhere you use Gmail, including on your phone.
Sending limits
Google caps how many messages an account may send in a day, and how many recipients a single message may address. The limits apply to mail sent through SMTP exactly as they do to mail sent from the web interface, and newer accounts are generally held to tighter limits until they have been used normally for a while.
Hitting a limit produces a temporary block rather than a permanent failure. Sending resumes on its own once the window rolls over — usually within a day. There is nothing to fix and nothing to appeal.
If you send in bulk, do not use a personal Gmail account. Newsletters, contact form notifications, automated alerts and anything scripted are all better served by a dedicated sending service. They are built for volume, they handle deliverability properly, and a problem there does not put your personal mail at risk. An account suspended for bulk sending takes your own correspondence down with it.
When mail still will not send
Check the credentials type first. An app password, or sign-in through Google — not your ordinary password.
Check the port and encryption pairing. 587 expects STARTTLS, 465 expects SSL/TLS. Mixing them produces errors that read like network faults.
Try a mobile hotspot. A message that sends instantly on mobile data but times out on your office or hotel network tells you the network is blocking outbound mail ports, not that your settings are wrong. On a corporate network, ask whoever runs it.
Check the attachment size. A message stuck in the outbox is sometimes simply too large, and Gmail will offer a Drive link instead.
Check whether you have hit a sending limit, particularly if it worked earlier the same day.
Printers, scanners and scripts
Devices with a "scan to email" feature, network storage sending notifications, and scripts talking raw SMTP all need an app password, since none of them can perform a browser sign-in.
Name each app password after the device that uses it — "office scanner", "backup server". In two years you will have several, and an unlabelled list gives you no way to tell which one you are revoking access from. And note that changing your Google password revokes every app password at once, which is why every device tends to stop working simultaneously after a password reset.
Checked against the source
Official sources
Enquiries
Frequently asked questions
What is Gmail's SMTP server?
smtp.gmail.com on port 587 with STARTTLS, or port 465 with SSL/TLS. Sign in with your full Gmail address.
Why won't Gmail accept my password for SMTP?
Google no longer accepts ordinary passwords over SMTP. Use a client that signs in with Google, or generate an app password.
How many emails can I send through Gmail SMTP per day?
Google caps daily volume to contain compromised accounts. Hitting it produces a temporary block that clears on its own. For bulk sending, use a dedicated service.
Can I use Gmail's SMTP for my website's contact form?
Technically yes with an app password, but it is a poor fit: personal sending limits apply, and a suspension takes your own mail down with it.
Next delivery
Keep reading
Gmail Sign Up
How to Create a Gmail Account
Create a Gmail address step by step — how to find a username that isn't taken, what to do when Google asks for a phone number, and the shortcuts worth avoiding.
6 min read
Gmail Troubleshooting
Gmail Not Working? Common Fixes
Why Gmail stops receiving mail, refuses to send, or loses messages you know arrived — and how to find the cause rather than guessing at it.
6 min read
Gmail Security
Gmail Security: 2-Step Verification and App Passwords
Turn on 2-Step Verification, generate an app password for mail clients that cannot use OAuth, and understand why your ordinary Gmail password stopped working.
6 min read
Gmail Password Reset
How to Reset Your Gmail Password
Reset a forgotten Gmail password, and get through Google's account recovery when you have no recovery phone or email — including what actually improves your chances of passing.
6 min read
Gmail Login
How to Log In to Gmail
Sign in to Gmail on any device — including what to do when Google asks for a passkey instead of your password, and how to fix the errors that stop you getting in.
7 min read
Gmail IMAP
Gmail IMAP Settings
Gmail’s IMAP server, port and encryption settings—plus secure sign-in options and fixes for duplicate messages caused by the All Mail folder.
3 min read