Google Workspace SMTP Setup Complete Tutorial: Server Settings, Sending Limits & Troubleshooting

Google Workspace SMTP Setup Complete Tutorial: Server Settings, Sending Limits & Troubleshooting
"My website needs to send notification emails, but I don't know how to set up Google Workspace SMTP?"
Many people can send and receive emails with Google Workspace without issues, but get stuck when trying to send emails from websites or applications via SMTP.
This article will teach you how to fully configure Google Workspace SMTP, including common WordPress integration.
For complete Google Workspace features, see Google Workspace Complete Guide.
SMTP Basic Concepts
What is SMTP?
SMTP (Simple Mail Transfer Protocol) is the standard protocol for sending emails.
Uses:
- Website system notifications (order confirmations, password resets)
- Application reminders
- Notifications from printers, scanners, and other devices
Why configure SMTP?
Websites or applications need a "mail server" to send emails. You can:
- Set up your own mail server (very complex)
- Use third-party services (SendGrid, Mailgun)
- Use Google Workspace SMTP (focus of this article)
Google Workspace SMTP Options
Google Workspace offers three SMTP sending methods:
| Method | Authentication | Limit | Suitable For |
|---|---|---|---|
| Gmail SMTP | Account password/OAuth | 500/day | Small volume |
| SMTP Relay | IP whitelist | 10,000/day | Internal systems |
| External SMTP | Account password | Varies | Third-party integration |
Gmail SMTP Setup
This is the most common method, suitable for small websites or applications.
Server Configuration Information
| Item | Value |
|---|---|
| SMTP Server | smtp.gmail.com |
| Port | 587 (TLS) or 465 (SSL) |
| Authentication Required | Yes |
| Account | Your Google Workspace Email |
| Password | App password (not regular password) |
Step 1: Generate App Password
Google doesn't allow direct SMTP login with account password; you need to generate an "App Password."
Prerequisite: Account must have Two-Step Verification (2FA) enabled
Generation steps:
- Go to Google Account Security
- Find "2-Step Verification"
- Click "App passwords"
- Select "Other," enter a name (e.g., "WordPress")
- Click "Generate"
- Note down the 16-character password generated
Note: This password is only shown once; save it securely.
Step 2: Test Connection
After configuration, test if emails can be sent normally.
Test with Telnet (advanced):
telnet smtp.gmail.com 587
Test with online tools: Search "SMTP Test Tool" and enter your configuration to test.
Having Trouble with Setup?
SMTP setup involves multiple components; one mistake and emails won't send. Let us help quickly resolve setup issues.
SMTP Relay Setup (Enterprise Use)
If you have multiple systems sending emails or high sending volume, SMTP Relay is recommended.
SMTP Relay vs Gmail SMTP
| Item | Gmail SMTP | SMTP Relay |
|---|---|---|
| Authentication | Account password | IP whitelist |
| Daily limit | 500 emails | 10,000 emails |
| Configuration location | Per user | Admin Console |
| Suitable for | Small applications | Enterprise internal systems |
Configuration Steps
Step 1: Enter Admin Console
- Log into admin.google.com
- Go to "Apps" → "Google Workspace" → "Gmail"
- Click "Routing"
Step 2: Configure SMTP Relay
- Click "Configure" under "SMTP Relay service"
- Set allowed senders:
- Only registered apps in my domains
- Or only users in my domains
- Set authentication method:
- Only accept mail from specified IP addresses
- Enter your server IP
- Set encryption:
- Recommend "Require TLS encryption"
Step 3: Note Configuration Information
| Item | Value |
|---|---|
| SMTP Server | smtp-relay.gmail.com |
| Port | 587 (TLS) or 465 (SSL) |
| Authentication Required | No (if IP whitelist is configured) |
Use Cases
- Internal ERP system notifications
- Server monitoring alerts
- Printer scan-to-email
- Internal applications
WordPress Integration Tutorial
WordPress is one of the most common scenarios requiring SMTP configuration.
Why Configure It?
WordPress defaults to using PHP mail() for sending, but:
- Many hosts disable this function
- Sent emails easily go to spam
- Can't track if successful
After SMTP configuration, emails are sent through Google, greatly improving delivery rates.
Using Plugin Configuration
Recommended plugin: WP Mail SMTP
Installation steps:
- WordPress admin → "Plugins" → "Add New"
- Search "WP Mail SMTP"
- Install and activate
Configuration steps:
- Go to "WP Mail SMTP" → "Settings"
- Select mailer: "Other SMTP"
- Fill in configuration:
| Field | Value |
|---|---|
| SMTP Host | smtp.gmail.com |
| Encryption | TLS |
| SMTP Port | 587 |
| Authentication | On |
| SMTP Username | Your Email |
| SMTP Password | App password |
- Save settings
- Send test email
Common Issues
Issue: Not receiving test email
Check:
- Is app password correct
- Is 2FA enabled on account
- Is it in spam folder
Issue: "Cannot connect to SMTP server"
Check:
- Does host block port 587
- Try using port 465 (SSL)
- Confirm SMTP settings are correct
Issue: Email sent but recipient didn't receive
Check:
- Is it in spam folder
- Is DNS SPF record correct
- Does sending address match domain
Want to Use Third-Party Email Service?
If sending volume is high or you need better tracking, you may need a professional email service. Schedule architecture consultation and let us help plan the best solution.
Sending Limits Explained
Google Workspace Sending Limits
| Plan | Gmail SMTP | SMTP Relay |
|---|---|---|
| Business Starter | 500/day | 10,000/day |
| Business Standard | 2,000/day | 10,000/day |
| Business Plus | 2,000/day | 10,000/day |
| Enterprise | 2,000/day | Per contract |
Note:
- This is "per user" limit
- Gmail SMTP has stricter limits
- Exceeding limits results in temporary block
How to Avoid Hitting Limits?
- Distribute sending accounts: Don't use same account for everything
- Control sending frequency: Don't send large volumes in short time
- Use SMTP Relay: More relaxed limits
- Consider professional email services: SendGrid, Mailgun
What If Sending Volume Is High?
If your sending needs exceed Google limits:
Option 1: Multi-account distribution
- 2,000 per account
- 5 accounts = 10,000
Option 2: Use professional email services
- SendGrid (free 100/day)
- Mailgun (free 5,000/month)
- Amazon SES (very low cost)
Common Error Troubleshooting
Error: 535 Authentication Failed
Causes:
- Wrong password
- Not using app password
- Account doesn't have 2FA enabled
Solutions:
- Confirm account has 2FA enabled
- Regenerate app password
- Confirm password is correct (watch for spaces)
Error: Connection Timed Out
Causes:
- Host blocks SMTP ports
- Firewall blocking
Solutions:
- Contact host to confirm ports 587/465 are open
- Try different port
- Switch to other email service
Error: 550 Mail rejected
Causes:
- Sending address doesn't exist
- Flagged as spam
- DNS configuration issues
Solutions:
- Confirm sending address is valid Workspace account
- Check if SPF record includes Google
- Check if DKIM is configured correctly
Emails Going to Spam
Common causes:
- SPF/DKIM/DMARC not configured
- Email content flagged as spam
- Sending address doesn't match domain
Solutions:
- Set SPF record:
v=spf1 include:_spf.google.com ~all - Enable DKIM (configure in Admin Console)
- Set DMARC policy
For DNS settings, see Google Workspace MX Record Setup Tutorial.
Security Considerations
Protecting App Passwords
- Don't write passwords in public code
- Use environment variables or config files
- Change passwords regularly
IP Whitelist
When using SMTP Relay:
- Only allow necessary IPs
- Regularly review whitelist
- Remove IPs no longer in use
Monitor Sending Activity
- Regularly check Admin Console email logs
- Watch for abnormal sending behavior
- Set sending volume alerts
FAQ
Can personal Gmail be used?
Yes, configuration is similar. But:
- Daily limit only 500
- Not suitable for business use
- Recommend using Google Workspace
Which port is better?
- 587 (TLS): Recommended, newer standard
- 465 (SSL): Backup, if 587 is blocked
Is OAuth authentication more secure?
Yes, OAuth doesn't require storing passwords, more secure. But configuration is more complex; for simple sending needs, app password is sufficient.
Need Help with SMTP Setup?
SMTP setup involves DNS, firewalls, authentication, and more; one mistake and emails won't send.
Schedule a free consultation and let us help you quickly complete setup and ensure emails send properly.
Related Reading
- For complete introduction, see Google Workspace Complete Guide
- For DNS setup, see Google Workspace MX Record Setup Tutorial
- For admin tutorial, see Google Workspace Admin Complete Guide
- For security settings, see Google Workspace 2FA Setup Guide
References
Need Professional Cloud Advice?
Whether you're evaluating cloud platforms, optimizing existing architecture, or looking for cost-saving solutions, we can help
Book Free ConsultationRelated Articles
Google Workspace MX Record Setup Tutorial: Complete Steps for Various DNS Providers
How to set up Google Workspace MX records? Complete tutorial with setup steps for major DNS providers including GoDaddy, Cloudflare, and more.
Google WorkspaceGoogle Workspace Flows Workflow Automation: Feature Introduction & Tutorial
What is Google Workspace Flows? Complete analysis of workflow automation features, relationship with AppSheet, and practical automation tutorial examples.
Google WorkspaceGoogle Workspace Marketplace Complete Guide: Must-Have Add-ons & App Recommendations [2025]
What are the best add-ons in Google Workspace Marketplace? 20+ must-install app recommendations to boost team collaboration. Installation tutorials and security considerations all in one guide!