Created
March 5, 2010 18:36
-
-
Save kevinpfromnm/322998 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UserMailer < ActionMailer::Base | |
def forgot_password(user, key) | |
host = Hobo::Controller.request_host | |
app_name = Hobo::Controller.app_name || host | |
@subject = "#{app_name} -- forgotten password" | |
@body = { :user => user, :key => key, :host => host, :app_name => app_name } | |
@recipients = user.email_address | |
@from = "no-reply@#{host}" | |
@sent_on = Time.now | |
@headers = {} | |
end | |
def email_verification(user, key) | |
host = Hobo::Controller.request_host | |
app_name = Hobo::Controller.app_name || host | |
@subject = "#{app_name} -- verify email" | |
@body = { :user => user, :key => key, :host => host, :app_name => app_name } | |
@recipients = user.email_address | |
@from = "no-reply@#{host}" | |
@sent_on = Time.now | |
@headers = {} | |
end | |
def email(user,subject,message) | |
host = Hobo::Controller.request_host | |
app_name = Hobo::Controller.app_name || host | |
@subject = "#{app_name} -- #{subject}" | |
@body = { :user => user, :host => host, :app_name => app_name, :message => message } | |
@recipients = user.email_address | |
@from = "no-reply@#{host}" | |
@sent_on = Time.now | |
@headers = {} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment