Gmail SMTP settings
Use these settings to send mail through Gmail from another email app, a website, a printer or a scanner. Since Google turned off plain-password sign-in for apps, the password part is where most setups fail.
Server: smtp.gmail.com. Port: 587 with TLS/STARTTLS, or 465 with SSL. Username: your full Gmail address. Password: a 16-character app password (needs 2-Step Verification), not your normal password, unless the app offers "Sign in with Google". Personal Gmail can send to about 500 recipients a day.
Free tool: test your domain's records with the MX, SPF, DKIM and DMARC checker.
Gmail server settings
| Setting | Outgoing (SMTP) | Incoming (IMAP) | Incoming (POP) |
|---|---|---|---|
| Server | smtp.gmail.com | imap.gmail.com | pop.gmail.com |
| Port | 587 (TLS) or 465 (SSL) | 993 | 995 |
| Security | STARTTLS on 587, SSL on 465 | SSL | SSL |
| Sign-in | Full Gmail address plus app password, or Sign in with Google | ||
IMAP is always on for personal Gmail accounts; there is no longer a setting to turn it on.
Create an app password
- Turn on 2-Step Verification in your Google Account (Security section).
- Go to myaccount.google.com/apppasswords.
- Type a name for the app, such as "Printer", and create it.
- Copy the 16-character password into the app's password field. You will not see it again.
App passwords are not available if your account only uses security keys, uses Advanced Protection, or is a work or school account where the admin has turned them off. Changing your Google password cancels all app passwords.
Google Workspace: three ways to send from apps and printers
| Option | Server and ports | Best for |
|---|---|---|
| Gmail SMTP server | smtp.gmail.com, 465 or 587 | One app sending as one user, with an app password. Up to 2,000 messages a day. |
| SMTP relay | smtp-relay.gmail.com, 25, 465 or 587 | Printers, scanners and systems; admin sets it up and allows your IP address. Up to 10,000 recipients per user per day. |
| Restricted server | aspmx.l.google.com, port 25 | Devices that can only send to your own Gmail or Workspace users. No sign-in. |
Sending limits
- Personal Gmail: about 500 recipients in one email or about 500 recipients a day. Go over and sending stops for up to 24 hours.
- Google Workspace: 2,000 messages a day per user.
- For newsletters or marketing, use an email marketing service. Gmail SMTP is meant for personal and app mail. Before a big send, clean the list so bounces do not count against you.
Common SMTP errors
| Error | Usual cause and fix |
|---|---|
| 535 Username and Password not accepted | You used your normal password. Create an app password. |
| Connection timed out | Wrong port or your network blocks it. Try 587, then 465. |
| Must issue a STARTTLS command first | Turn on TLS/STARTTLS for port 587. |
| 550 Daily sending quota exceeded | You hit the daily limit. Wait up to 24 hours. |
Questions people ask
- Is the Gmail SMTP port 587 or 465?
- Both work. Use 587 with TLS (STARTTLS) or 465 with SSL.
- Can I use Gmail SMTP without an app password?
- Only if the app supports Sign in with Google (OAuth). Otherwise you need 2-Step Verification and an app password.
- What is the Gmail SMTP relay?
- smtp-relay.gmail.com is a Google Workspace service that lets admins route mail from printers, apps and servers through Google. It is not available to personal Gmail accounts.
Sending one email to a whole list? Check the addresses first with Veml, which removes bad and risky emails before you hit send. (Veml and EmailNa have the same owner.)