Skip to content

Instantly share code, notes, and snippets.

@josevalim
Created January 25, 2010 09:54
Show Gist options
  • Select an option

  • Save josevalim/285755 to your computer and use it in GitHub Desktop.

Select an option

Save josevalim/285755 to your computer and use it in GitHub Desktop.
class <%= class_name %> < ActionMailer::Base
delivers_from "mail@<%= Rails.application.name %>.com"
<% for action in actions -%>
# Subject can be set in your I18n file at config/locales/en.yml
# with the following lookup:
#
# en.actionmailer.<%= file_name %>.<%= action_name %>.subject
#
def <%= action %>
@greeting = "Hi, "
mail(:to => "")
end
<% end -%>
end
class <%= class_name %> < ActionMailer::Base
<% for action in actions -%>
def <%= action %>(sent_at = Time.now)
subject '<%= class_name %>#<%= action %>'
recipients ''
from ''
sent_on sent_at
body :greeting => 'Hi,'
end
<% end -%>
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment