Sending email from app using Resend.com

A walkthrough of taking the bookmark-sharing email feature from local-only (using Letter Opener) to fully working on live environments. Set up a Resend account, verify a sending subdomain, store API keys in environment-specific Rails credentials, and let Claude Code handle the Rails integration code before deploying to both staging and production.

  • Why nothing happens when sharing a bookmark on the deployed app yet
  • Generating a Resend API key from the dashboard
  • Editing Rails encrypted credentials per environment with bin/rails credentials:edit --environment staging (and production)
  • Recommending a terminal alias for the long credentials command
  • Storing the same Resend API key under both staging and production credentials
  • Adding a sending subdomain instead of the root domain
  • Auto-configuring Resend's DNS records through Cloudflare's integration
  • Verifying the domain and confirming MX/TXT records appeared in Cloudflare DNS
  • Letting Claude Code ask clarifying questions and pointing it at the official Resend Rails docs URL
  • Setting the from address while keeping reply-to as the account owner
  • Mention of using Cloudflare for free inbound email forwarding (not covered here)
  • Pushing to main and staging together as an exception for a brand-new app with no users
  • Watching auto-deploys run in Hatchbox for both environments
  • Testing the live email send and confirming reply-to routes back to the sender
← Back to library