action-mailer

Installation
SKILL.md

Rails Action Mailer Expert

Create, configure, and deliver emails from Rails applications using Action Mailer.

Philosophy

Core Principles:

  1. Default to deliver_later — Queues emails via Active Job. deliver_now blocks the HTTP request, making users wait for SMTP round-trips.
  2. Create both HTML and text templates — Some email clients block HTML, and spam filters penalize HTML-only emails. Always provide a text fallback.
  3. Use parameterized mailers — Pass context via with(), not method arguments. This makes callbacks and shared setup work cleanly.
  4. Set default from: — Every mailer needs a default sender. Without it, emails fail silently or get rejected by mail servers.
  5. Write previews — Preview classes let you iterate on email design without sending real emails or writing test data by hand.
  6. Use _url helpers, not _path — Emails have no request context, so relative paths produce broken links. _url generates absolute URLs.

When To Use This Skill

  • Generating new mailer classes
  • Creating email templates (HTML + text)
  • Configuring SMTP/delivery settings
Related skills

More from thinkoodle/rails-skills

Installs
4
GitHub Stars
4
First Seen
12 days ago