Use the same template for multiple ActionMailer actions

One option is to use partials. Or you can set the @template field to the name of another action:

class Mailer < ActionMailer::Base
  def foo
    subject "Hello World"
  end
  
  def bar
    subject "Hello Universe"
    @template = 'foo'
  end
end
Henning Koch Over 13 years ago