Class: Caseadilla::CaseadillaNotification

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

Instance Method Summary collapse

Instance Method Details

#generate_new_password(from, caseadilla_admin_user, host, pass) ⇒ Object


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

def generate_new_password from, caseadilla_admin_user, host, pass
	@name = caseadilla_admin_user.name
	@host = host
	@login = caseadilla_admin_user.
	@pass = pass
	@from_text = caseadilla_config_website_name
	
	mail(:to => caseadilla_admin_user.email, :from => from, :subject => "[#{caseadilla_config_website_name}] New password")
end

#new_user_information(from, caseadilla_admin_user, host, pass) ⇒ Object


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

def new_user_information from, caseadilla_admin_user, host, pass
   @name = caseadilla_admin_user.name
	@host = host
	@login = caseadilla_admin_user.
	@pass = pass
	@from_text = caseadilla_config_website_name
	
	mail(:to => caseadilla_admin_user.email, :from => from, :subject => "[#{caseadilla_config_website_name}] New user account")
end

#password_reset_instructions(from, caseadilla_admin_user, host) ⇒ Object


27
28
29
30
31
32
33
34
35
36
# File 'app/mailers/caseadilla/caseadilla_notification.rb', line 27

def password_reset_instructions from, caseadilla_admin_user, host
 ActionMailer::Base.default_url_options[:host] = host.gsub("http://", "")
  @name = caseadilla_admin_user.name
  @host = host
  @login = caseadilla_admin_user.
  @reset_password_url = edit_caseadilla_password_reset_url + "/?token=#{caseadilla_admin_user.perishable_token}"
  @from_text = caseadilla_config_website_name

  mail(:to => caseadilla_admin_user.email, :from => from, :subject => "[#{caseadilla_config_website_name}] Password reset instructions")
end