Configuring Gmail SMTP settings correctly helps you send mail reliably from third-party apps and your own domain. This guide walks through the essential server details, security options, and troubleshooting steps you need.
Use the table below as a quick reference for Gmail SMTP configuration across common email clients and scenarios.
| Email Client | Outgoing Server (SMTP) | Port | Security |
|---|---|---|---|
| Gmail Web | smtp.gmail.com | — | TLS internally managed |
| Desktop App (Windows/Mac) | smtp.gmail.com | 587 | STARTTLS |
| Mobile App (iOS/Android) | smtp.gmail.com | 587 | STARTTLS |
| Legacy SSL Clients | smtp.gmail.com | 465 | SSL/TLS |
| Google Workspace/G Suite | smtp-relay.gmail.com or smtp.gmail.com | 587 | STARTTLS with required authentication |
SMTP Server Configuration Details
Use smtp.gmail.com as the outgoing server hostname for all Gmail accounts. For standard delivery, choose port 587 with STARTTLS to upgrade the connection securely. If your client only supports SSL, use port 465, but note that Google may deprecate this path over time.
Each message must include full authentication, which verifies your identity and prevents unauthorized relay. Enabling two-factor authentication (2FA) and app passwords adds an extra layer of protection when using less common mail clients.
Authentication and Account Settings
Before you can send mail, your Gmail account must allow less secure apps access or, more securely, use app-specific passwords when 2FA is active. Google verifies credentials against smtp.gmail.com, rejecting unauthorized senders immediately.
For Google Workspace users, work or school accounts may route through smtp-relay.gmail.com with different rate limits and admin controls. Check your administrator settings if your organization manages mail delivery policies centrally.
Common Errors and Fixes
Error 535 usually indicates wrong username or password, so double-check credentials or generate a new app password. Error 550 often points to sender policy framework (SPF) issues, meaning your domain is not authorized to relay through Gmail.
Connection timeouts can occur if your network blocks port 587 or 465. Contact your IT team to allow outbound traffic on these standard SMTP ports and ensure TLS is enabled for compliance.
Sending Limits and Best Practices
Free Gmail accounts cap messages per day and recipients per message to reduce abuse. Google Workspace plans expand these limits but still enforce throttling during high-volume sends.
To maintain deliverability, align your headers with SPF, DKIM, and DMARC records. Avoid spam triggers by keeping content clear and refraining from excessive links or attachments in routine mail.
Key Takeaways for Gmail SMTP Setup
- Always use smtp.gmail.com as the hostname.
- Prefer port 587 with STARTTLS for modern clients.
- Enable 2FA and use app passwords for secure authentication.
- Monitor daily sending limits to avoid delivery interruptions.
- Configure SPF, DKIM, and DMARC for better inbox placement.
FAQ
Reader questions
Why does my email client say authentication failed when using Gmail SMTP?
Turn on 2FA and generate an app password, or enable "Allow less secure apps" if your account policy permits, and update the password in your mail client.
Can I use Gmail SMTP for newsletters to many subscribers?
Free accounts quickly hit daily sending limits, and bulk mail may trigger spam flags; use a dedicated mailing service with proper list management instead.
What should I do if outgoing mail gets marked as spam when sending through Gmail SMTP?
Check SPF and DKIM alignment, ensure your sending IP is not blacklisted, and avoid misleading subject lines or excessive promotional language. Port 465 with SSL remains available for legacy devices, but port 587 with STARTTLS is recommended for better compatibility and security updates.