Skip to main content
OpenSRE can send background RCA completion emails through any existing SMTP relay you already use. You do not need to run your own mail server. Typical providers:
  • Google Workspace / Gmail SMTP
  • Microsoft 365 SMTP
  • AWS SES SMTP
  • SendGrid / Postmark / Mailgun SMTP
  • local dev SMTP sinks like Mailpit or MailHog

What this powers

In v1, the smtp integration is used for:
  • /background RCA completion notifications
The email summary includes:
  • Root cause
  • Top analysis
  • What to do next
  • a small internal stats block

Step 1: Configure the integration

Via CLI wizard

opensre integrations setup smtp
You’ll be prompted for:
  • SMTP host
  • SMTP port
  • security mode: starttls, ssl, or none
  • optional username/password
  • sender address
  • optional default recipient

Via environment variables

SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_SECURITY=starttls
SMTP_USERNAME=mailer
SMTP_PASSWORD=secret
SMTP_FROM_ADDRESS=opensre@example.com
SMTP_DEFAULT_TO=team@example.com
If authentication is required, set both SMTP_USERNAME and SMTP_PASSWORD.

Step 2: Verify

opensre integrations verify smtp
A passing verification confirms OpenSRE can:
  • connect to the SMTP server
  • negotiate TLS when configured
  • authenticate when credentials are provided
Sample success output:
smtp: passed — Connected to SMTP server successfully.

Step 3: Use it with background investigations

Enable background mode in the interactive shell:
/background on
Then start an investigation as usual. When it completes, OpenSRE sends the RCA summary email to the configured default recipient. You can inspect the completed job in the shell with:
/background list
/background show <task_id>

Troubleshooting

DetailLikely cause
Missing recipient email addressNo SMTP_DEFAULT_TO is configured yet.
username and password must both be setOnly one auth field was provided.
from_address must look like an email addressSender address is malformed.
SMTP connection failedHost/port/TLS settings are wrong, or the relay is unreachable.
For local testing, Mailpit is a good fake SMTP target:
docker run -p 1025:1025 -p 8025:8025 axllent/mailpit
Then configure:
SMTP_HOST=localhost
SMTP_PORT=1025
SMTP_SECURITY=none
SMTP_FROM_ADDRESS=opensre@example.com
SMTP_DEFAULT_TO=team@example.com