How to Configure Gmail SMTP (Settings + Steps)
To send email through Gmail's SMTP server, use host smtp.gmail.com on port 587 with STARTTLS (or port 465 with SSL/TLS), authenticate with your full Gmail address as the username, and use a 16-character App Password as the password. Google no longer accepts your normal account password for SMTP, so you must generate an App Password first.
Gmail SMTP settings (copy these)
| Setting | Value |
|---|---|
| SMTP server (host) | smtp.gmail.com |
| Port (STARTTLS) | 587 |
| Port (SSL / implicit TLS) | 465 |
| Encryption | STARTTLS on 587, SSL/TLS on 465 |
| Username | Your full Gmail address ([email protected]) |
| Password | 16-character App Password (not your login password) |
| Authentication | Required |
Why you need an App Password
In 2022 Google turned off "less secure app access," which used to let apps sign in with your regular password. Now, SMTP authentication requires either OAuth 2.0 or an App Password: a 16-character code tied to your account that bypasses the normal login flow. App Passwords require that 2-Step Verification is turned on for your Google account first.
Step 1: Turn on 2-Step Verification
- Go to your Google Account at myaccount.google.com.
- Open the Security tab.
- Under "How you sign in to Google," select 2-Step Verification and follow the prompts to enable it.
App Passwords do not appear as an option until 2-Step Verification is active.
Step 2: Generate an App Password
- Still under Security, search for or navigate to App passwords (you can reach it directly at myaccount.google.com/apppasswords).
- Enter a recognizable name for the app (for example, "IGSendMail" or "My CRM").
- Click Create. Google displays a 16-character password in four groups of four.
- Copy it and paste it into your app's SMTP password field. Remove the spaces or leave them; both work. You will not be able to see this password again after closing the dialog.
Step 3: Enter the settings in your app
In whatever tool you are configuring (a mail client, a script, or a sending platform), enter:
- Host: smtp.gmail.com
- Port: 587 (with STARTTLS) or 465 (with SSL)
- Username: your full Gmail address
- Password: the App Password from Step 2
A minimal test in Python looks like this:
import smtplib
from email.mime.text import MIMEText
msg = MIMEText("Hello from Gmail SMTP")
msg["Subject"] = "SMTP test"
msg["From"] = "[email protected]"
msg["To"] = "[email protected]"
with smtplib.SMTP("smtp.gmail.com", 587) as server:
server.starttls()
server.login("[email protected]", "your16charapppass")
server.send_message(msg)
Gmail sending limits
Gmail SMTP is fine for low-volume, personal, or transactional testing, but it is not a bulk sender. A free Gmail account is limited to roughly 500 recipients per day through SMTP, and Google Workspace accounts to around 2,000 per day. Exceed those and Google temporarily locks sending. If you are sending newsletters or high-volume transactional mail, Gmail is the wrong tool.
When to use a dedicated relay instead
Gmail SMTP piggybacks on your personal reputation and daily quota, and it offers no analytics, no built-in authentication management for your own domain, and no room to scale. For anything beyond occasional sending, route through a purpose-built SMTP relay that sends from your own domain, handles SPF, DKIM, and DMARC automatically, and lifts the recipient cap. It is the difference between borrowing Gmail's mailbox and having your own sending infrastructure.
Frequently asked questions
What is Gmail's SMTP server address and port?
The server is smtp.gmail.com. Use port 587 with STARTTLS, or port 465 with SSL/TLS. Authentication is required, using your full Gmail address and an App Password.
Why is my Gmail SMTP login failing?
The most common cause is using your normal account password. Google requires an App Password (or OAuth 2.0) for SMTP, and App Passwords require 2-Step Verification to be enabled. Generate one at myaccount.google.com/apppasswords and use that instead.
How many emails can I send through Gmail SMTP?
A free Gmail account allows roughly 500 recipients per day via SMTP; Google Workspace allows around 2,000 per day. These are recipient counts, not message counts, and exceeding them temporarily suspends sending.
Do I need 2-Step Verification to use Gmail SMTP?
Effectively yes. Since "less secure app access" was removed, SMTP requires an App Password or OAuth 2.0, and App Passwords are only available once 2-Step Verification is turned on.
Ready to send from your own domain instead of a personal Gmail quota? Launch with IGSendMail and get real sending infrastructure in minutes.