<% module_namespacing do -%> class <%= class_name %>Mailer < ApplicationMailer <% actions.each_with_index do |action, index| -%> <% if index != 0 -%> <% end -%> # Subject can be set in your I18n file at config/locales/en.yml # with the following lookup: # # en.<%= file_path.tr("/",".") %>_mailer.<%= action %>.subject # def <%= action %> @greeting = "Hi" mail to: "to@example.org" end <% end -%> end <% end -%>