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:

  1. Go to Settings → Notifications
  2. Enter your email address
  3. Set email as your preferred channel (optional)
  4. 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

FeatureEmailSMS
Response timeMinutes to hoursSeconds to minutes
Rich content✓ Full HTMLPlain text only
CostLowerHigher (carrier fees)
Best forLong-form, non-urgentUrgent, time-sensitive

Deliverability

RelayRail emails are sent from a verified domain with proper SPF, DKIM, and DMARC records. To ensure delivery:

  • -Add notifications@relayrail.dev to 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:

.env
RESEND_API_KEY=re_xxxxxxxxxxxxx
RESEND_FROM_EMAIL=notifications@yourdomain.com