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

  1. Enable 2FA on Google account
  2. Generate App Password: myaccount.google.com/apppasswords
  3. 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

  1. Verify domain in AWS SES
  2. Request production access (exit sandbox)
  3. Create SMTP credentials in SES console
  4. 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

  1. Create SendGrid account
  2. Generate API key with "Mail Send" permission
  3. Username is always "apikey"
  4. 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

  1. Add domain to Mailgun
  2. Configure DNS records (SPF, DKIM)
  3. 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

  1. Use your Office 365 email and password
  2. Enable SMTP AUTH if disabled
  3. May require app password if MFA enabled

Testing Configuration

Send Test Email

After configuration, test email delivery:

  1. Go to Settings → Notification Channels
  2. Create an Email channel
  3. Click "Test Notification"
  4. 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.