Junior Track Roadmap

Mailers: templates & async

This course walks through the three mailers in one Rails app and how their emails get sent. Each mailer has an HTML and a plain-text template, which Action Mailer sends as one multipart email. The lessons cover passing data with .with(...), setting default_url_options per environment, and choosing between deliver_later and deliver_now. They then follow the queued jobs into Solid Queue, its database setup and its workers. The last part looks at config/recurring.yml and the scheduled tasks it runs in production.

What you'll learn

  • ✓How Action Mailer sends multipart emails from paired HTML and text templates
  • ✓Passing data into a mailer with .with(...) and reading it through params
  • ✓Setting default_url_options so a mailer can build absolute URLs
  • ✓When to use deliver_later and when deliver_now
  • ✓How Solid Queue stores jobs in database tables and runs them in workers
  • ✓Scheduling recurring tasks with config/recurring.yml
Free preview · Lesson 1 3 min read

Three mailers, each with an HTML and a text template

app/mailers/auth/password_mailer.rb:

Read the full lesson free →

Curriculum

7 lessons
Type to start searching...