SMTP Configuration¶
Configure SMTP server for email delivery.
SMTP (Simple Mail Transfer Protocol) allows the system to send emails through any mail server. This is the most flexible option and works with custom servers, Gmail, Office 365, or any email provider that supports SMTP.
Navigation: Settings → Email → SMTP (after selecting SMTP as provider)
Prerequisites¶
Before configuring SMTP, you need:
- SMTP server address (e.g.,
mail.company.com) - Port number (typically 587 or 465)
- Username (usually your email address)
- Password (application password, not account password)
- TLS/SSL encryption preference
SMTP Configuration Settings¶
Server Address¶
SMTP Server Hostname
The address of your mail server:
- Example:
smtp.gmail.com(Gmail) - Example:
smtp.office365.com(Office 365) - Example:
mail.company.com(Company server) - May be domain or IP address
Port Number¶
SMTP Port
The port your server uses:
- 587 - TLS/Explicit TLS (recommended)
- 465 - SSL/Implicit SSL (older, secure)
- 25 - Unencrypted (not recommended)
- Custom - If using non-standard port
Best practice: Use 587 with TLS encryption.
Authentication¶
Username
Usually your email address:
- Example:
admin@company.com - Example:
user+appname@gmail.com - Ask mail server administrator if unsure
Password
Your account password:
- For Gmail: App password (not account password)
- For Office 365: Standard password
- For Company server: Provided by IT
- Never share -store securely
⚠️ Security Note: Use application-specific passwords when available instead of account password.
Encryption¶
TLS/SSL Settings
How to encrypt communication with server:
- TLS (Recommended) - Port 587, upgrade to encrypted
- SSL - Port 465, immediate encryption
- None (Not recommended) - Unencrypted connection
Typical Configuration: - Port: 587 - Encryption: TLS - Requires: Username & Password
Provider-Specific Configurations¶
Gmail via SMTP¶
Server Address: smtp.gmail.com
Port: 587
Encryption: TLS
Username: Your Gmail address
Password: Gmail App Password
Steps: 1. Create App Password in Google Account 2. Use App Password (not account password) 3. Enable Less Secure App Access (if not using App Password)
Office 365 via SMTP¶
Server Address: smtp.office365.com
Port: 587
Encryption: TLS
Username: Your Office 365 email
Password: Your Office 365 password
Requirements: - Modern Authentication enabled (typical) - May require MFA bypass (app password)
Company/Custom Server via SMTP¶
Server Address: (from IT department) Port: (from IT, typically 587) Encryption: (from IT, typically TLS) Username: (from IT) Password: (from IT)
Contact IT support for configuration details.
Configuring SMTP¶
Step-by-Step Setup¶
- Settings → Email → Email Settings
- Select SMTP as provider
- Save to see SMTP configuration options
- Settings → Email → SMTP Configuration
Enter SMTP Details¶
- Server Address
- Enter SMTP server hostname
-
Example:
smtp.gmail.com -
Port Number
- Enter port number
-
Example: 587
-
Encryption
- Select TLS or SSL
-
Recommended: TLS with port 587
-
Username
- Enter SMTP username
-
Usually email address
-
Password
- Enter SMTP password
- For Gmail: App password (not account password)
-
For Office 365: Can be account password
-
From Address
- Email address shown as sender
- Must match configured account
-
Example:
noreply@company.com -
Save
Test Configuration¶
- Click Test SMTP Connection
- System attempts to:
- Connect to server
- Authenticate
- Send test email
- Wait for result message
- Success indicates "Connection successful"
If Test Fails¶
| Error | Cause | Solution |
|---|---|---|
| Connection refused | Wrong server/port | Verify server address and port |
| Authentication failed | Wrong credentials | Verify username and password |
| Encryption error | Wrong encryption type | Try different TLS/SSL setting |
| Timeout | Server not responding | Check firewall, try different port |
| Gmail error | Missing app password | Use app password, not account password |
Security Best Practices¶
Password Management¶
- ✅ Use app/application password when available
- ✅ Don't use account password
- ✅ Change passwords regularly
- ✅ Use strong passwords (20+ characters)
- ✅ Store password securely
- ✅ Never commit password to version control
- ✅ Use environment variables for sensitive data
Encryption¶
- ✅ Always use TLS or SSL encryption
- ✅ Never use unencrypted (port 25)
- ✅ Use port 587 (TLS) over 465 when possible
- ✅ Verify certificate validity
- ✅ Monitor for certificate expiration
Access Control¶
- ✅ Limit who can change email settings
- ✅ Use dedicated service account
- ✅ Don't use personal email account
- ✅ Rotate credentials periodically
- ✅ Audit who made configuration changes
Troubleshooting SMTP¶
Emails Not Sending¶
Check: 1. Email Settings has SMTP selected 2. SMTP configuration is complete 3. Test connection successful 4. Check Email Queue for errors 5. Verify credentials are correct
Try: - Send test email - Review email logs - Check mail server is running - Verify network connectivity
Authentication Failures¶
Gmail: - Using app password (not account password)? - Is 2-factor authentication enabled? - Is Less Secure App Access allowed?
Office 365: - Is modern authentication enabled? - Do you have MFA? Use app password if needed. - Is your account licensed for email?
Company Server: - Contact IT for account verification - Confirm username format (user@domain or domain\user) - Verify password hasn't expired
Slow Email Delivery¶
Check: - Server response time - Network bandwidth - Email queue size - Batch sending interval - Email rate limits
Optimize: - Use batch sending instead of immediate - Reduce email rate limit if overwhelming server - Check server logs for bottlenecks
Failed Connections¶
Firewall Issues: - Verify firewall allows outbound SMTP - Check if port is blocked - Try alternate port (if available) - Check with IT for firewall rules
Network Issues: - Verify internet connectivity - Check DNS resolution - Try alternate mail server (if available) - Check network cables
SMTP Sending Process¶
How SMTP Works¶
- Connection - Register connects to SMTP server
- Authentication - Logs in with username/password
- Compose - System builds email message
- Send - Transmits email to server
- Receipt - Server acknowledges receipt
- Delivery - Server delivers to recipient
Email Queue¶
If SMTP unavailable: - Email placed in queue - Retried based on retry policy - Eventually sent or failed after max attempts - No data loss
Failed Email Handling¶
When email fails: 1. Check error in Email Queue 2. Diagnose issue (see Troubleshooting) 3. Fix problem 4. Retry failed emails 5. Verify success
Monitoring SMTP¶
Email Logs¶
View recent SMTP activity:
- Settings → Email → Email Settings
- Click View Email Logs
- Filter by:
- Date range
- Status (Sent, Failed, Retrying)
- Recipient
- Review for issues
Success Metrics¶
Monitor: - Successful deliveries - Failed attempts - Retry count - Delivery time - Bounce rate
SMTP Best Practices¶
- ✅ Use TLS encryption (port 587)
- ✅ Test immediately after configuration
- ✅ Use app passwords (not account password)
- ✅ Monitor email queue regularly
- ✅ Review logs for failures
- ✅ Use dedicated service account
- ✅ Verify SPF/DKIM records (if domain owner)
- ✅ Keep credentials secure
- ✅ Update passwords periodically
- ✅ Document configuration for support