actionmailer-baseline
ActionMailer Baseline
Send email from a Rails 8 app without four classic mistakes: blocking the request thread, double-sending on retry, leaking PII in logs, or rendering broken HTML that bounces. AI agents reach for
ActionMailer::Base.mailwithdeliver_nowby default and stop there. This skill covers the rest.
Why this matters
Email is the integration most teams underestimate. It's external infrastructure (SMTP, vendor APIs), it has rate limits, it has bounce rules, it has spam-trap consequences. Doing it casually means either sluggish requests, lost mail, or your domain on a deny-list.
The opinion
deliver_lateris the default. Neverdeliver_nowin the request path. Mailer previews wired in development. Postmark / SendGrid / SES / Mailgun via the vendor's Rails adapter; don't roll your own SMTP. Bounce + complaint handling required for any user-facing app at scale. Idempotency on transactional sends (password reset link generated once per request, not per retry). PII filtered from logs and error reports.
Counter-positions:
deliver_nowis legitimate in tests (synchronous) and in admin tools (where blocking the admin user 200ms is fine). Never in user-facing request paths.- Action Mailbox for receiving email — different scope (deferred to v0.2). This skill covers sending.