Class | EmailNotifier |
In: |
app/models/email_notifier.rb
|
Parent: | ActionMailer::Base |
File: | email_notifier.rb |
(C): | Hipposoft 2008, 2009 |
Purpose: | Send out e-mail messages when important things happen. |
24-Dec-2007 (ADH): Created.
Send a message to a user when their account settings are changed. Pass the User object representing the updated account.
# File app/models/email_notifier.rb, line 32 32: def admin_update_notification( user ) 33: recipients "#{ user.name } <#{ user.email }>" 34: from EMAIL_ADMIN 35: subject "#{ EMAIL_PREFIX }Your account has been configured" 36: body :user => user 37: end
Send a message to the administrator when a new user signs up. Pass the new User object.
# File app/models/email_notifier.rb, line 15 15: def signup_notification( user ) 16: recipients EMAIL_ADMIN 17: from EMAIL_ADMIN 18: subject "#{ EMAIL_PREFIX }A new user has signed up" 19: body :user => user, 20: :account_url => url_for( { 21: :protocol => 'https', 22: :host => EMAIL_HOST, 23: :controller => 'users', 24: :action => 'edit', 25: :id => user.id 26: } ) 27: end