Builder Methods library
Sending email with Letter Opener and Resend
Fake email locally with Letter Opener so you never accidentally spam a real user, and real email in production with Resend. Both are already wired up in the template.
Sending email from a Rails app is one of the first "real" features every beginner hits, and it's also one of the easiest ways to get yourself in trouble — accidentally emailing real users with test content, burning through provider quotas, or just slowing your dev loop to a crawl.
In this lesson we'll cover why real email in development is always a bad idea, introduce Letter Opener as the tool that intercepts email locally, explain why I use Resend for production (and why other good options are fine too), and close with a screen demo of Letter Opener catching a real email from the template.
- Why you never want your app sending real email while you're building
- How Letter Opener intercepts email locally and shows it in your browser
- Why I use Resend for production email, and the alternatives worth knowing about
- How Rails automatically switches between Letter Opener and Resend based on environment
