SMTP & Email Configuration
Configure SMTP to enable email notifications for incidents and alerts. Supports Gmail, AWS SES, SendGrid, Mailgun, Office 365, and custom SMTP servers.
Provider Configurations
Gmail
Configuration
SMTP_HOST=smtp.gmail.com SMTP_PORT=587 SMTP_USERNAME=your-email@gmail.com SMTP_PASSWORD=abcd efgh ijkl mnop # App Password FROM_EMAIL=your-email@gmail.com
Setup Steps
- Enable 2FA on Google account
- Generate App Password: myaccount.google.com/apppasswords
- Use 16-character app password (NOT your Gmail password)
AWS SES
Configuration
SMTP_HOST=email-smtp.us-east-1.amazonaws.com SMTP_PORT=587 SMTP_USERNAME=AKIAIOSFODNN7EXAMPLE SMTP_PASSWORD=BAsD1234567890ExampleSMTPPassword FROM_EMAIL=verified@yourdomain.com
Setup Steps
- Verify domain in AWS SES
- Request production access (exit sandbox)
- Create SMTP credentials in SES console
- Use SMTP credentials (not IAM keys)
SendGrid
Configuration
SMTP_HOST=smtp.sendgrid.net SMTP_PORT=587 SMTP_USERNAME=apikey SMTP_PASSWORD=SG.aBcDeFgHiJkLmN... # API Key FROM_EMAIL=noreply@yourdomain.com
Setup Steps
- Create SendGrid account
- Generate API key with "Mail Send" permission
- Username is always "apikey"
- Verify sender identity
Mailgun
Configuration
SMTP_HOST=smtp.mailgun.org SMTP_PORT=587 SMTP_USERNAME=postmaster@yourdomain.mailgun.org SMTP_PASSWORD=your-mailgun-password FROM_EMAIL=noreply@yourdomain.com
Setup Steps
- Add domain to Mailgun
- Configure DNS records (SPF, DKIM)
- Get SMTP credentials from domain settings
Office 365
Configuration
SMTP_HOST=smtp.office365.com SMTP_PORT=587 SMTP_USERNAME=your-email@company.com SMTP_PASSWORD=your-password FROM_EMAIL=your-email@company.com
Setup Steps
- Use your Office 365 email and password
- Enable SMTP AUTH if disabled
- May require app password if MFA enabled
Testing Configuration
Send Test Email
After configuration, test email delivery:
- Go to Settings → Notification Channels
- Create an Email channel
- Click "Test Notification"
- Check your inbox (and spam folder)
Troubleshooting
Authentication Failed
- Verify username and password are correct
- For Gmail, use App Password, not account password
- Check if SMTP authentication is enabled
Connection Timeout
- Check firewall rules allow port 587
- Try port 465 (SSL) or 25 (legacy)
- Verify SMTP host is correct
Emails Going to Spam
- Configure SPF, DKIM, DMARC records
- Use verified domain for FROM_EMAIL
- Avoid spammy subject lines
Best Practices
Use Dedicated Email Service: Don't use personal Gmail for production. Use AWS SES, SendGrid, or similar for reliability and deliverability.
🔒 Secure Credentials: Store SMTP password in environment variables or secrets manager, never in code or config files.
📧 Professional FROM Address: Use noreply@yourdomain.com or alerts@yourdomain.com for better deliverability and branding.