Class: UserMailer

Inherits:
ActionMailer::Base
  • Object
show all
Defined in:
app/mailers/user_mailer.rb

Overview

Copyright © 2008-2013 Michael Dvorkin and contributors.

Fat Free CRM is freely distributable under the terms of MIT license. See MIT-LICENSE file or www.opensource.org/licenses/mit-license.php


Instance Method Summary collapse

Instance Method Details

#assigned_entity_notification(entity, assigner) ⇒ Object



17
18
19
20
21
22
23
24
25
# File 'app/mailers/user_mailer.rb', line 17

def assigned_entity_notification(entity, assigner)
  @entity_url = url_for(entity)
  @entity_name = entity.name
  @entity_type = entity.class.name
  @assigner_name = assigner.name
  mail :subject => "Fat Free CRM: You have been assigned #{@entity_name} #{@entity_type}",
       :to => entity.assignee.email,
       :from => "Fat Free CRM <[email protected]>"
end

#password_reset_instructions(user) ⇒ Object



8
9
10
11
12
13
14
15
# File 'app/mailers/user_mailer.rb', line 8

def password_reset_instructions(user)
  @edit_password_url = edit_password_url(user.perishable_token)

  mail :subject => "Fat Free CRM: " + I18n.t(:password_reset_instruction),
       :to => user.email,
       :from => "Fat Free CRM <[email protected]>",
       :date => Time.now
end