Email Setup
Configure email notifications for your RelayRail agents.
How Email Works
RelayRail uses Resend to send transactional emails. When your agent triggers a notification or approval request, users receive a styled email with action buttons.
Sender: notifications@relayrail.dev
User Configuration
Users configure their email in the RelayRail dashboard:
- Go to Settings → Notifications
- Enter your email address
- Set email as your preferred channel (optional)
- Save changes
Tip: Users can receive both SMS and email. The agent can specify which channel to use, or let RelayRail route based on user preferences.
Email Types
Approval Requests
Emails with YES/NO buttons or multiple choice options. Users click a button to respond directly.
Subject: "[Action Required] Your agent needs approval"
Notifications
Informational emails about task progress, completions, or errors. No response required.
Subject: "[RelayRail] Task completed successfully"
Response Requests
Emails with a link to the web response page for free-form text input.
Subject: "[Input Needed] Your agent is waiting for your response"
Specifying Email Channel
Your agent can explicitly request email delivery:
// Force email delivery
{
"message": "Deployment complete!",
"channel": "email"
}
// Let user preference decide
{
"message": "Deployment complete!"
// No channel specified - uses user's preference
}Email vs SMS
| Feature | SMS | |
|---|---|---|
| Response time | Minutes to hours | Seconds to minutes |
| Rich content | ✓ Full HTML | Plain text only |
| Cost | Lower | Higher (carrier fees) |
| Best for | Long-form, non-urgent | Urgent, time-sensitive |
Deliverability
RelayRail emails are sent from a verified domain with proper SPF, DKIM, and DMARC records. To ensure delivery:
- -Add
notifications@relayrail.devto your contacts - -Check spam/junk folders if emails aren't arriving
- -Whitelist the RelayRail domain in your email client
Self-Hosting
If self-hosting RelayRail, you'll need to configure Resend:
RESEND_API_KEY=re_xxxxxxxxxxxxx
RESEND_FROM_EMAIL=notifications@yourdomain.com