Class: Kryptonite::KryptoniteNotification

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

Instance Method Summary collapse

Instance Method Details

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



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

def generate_new_password from, kryptonite_user, host, pass
	@name = kryptonite_user.name
	@host = host
	@login = kryptonite_user.
	@pass = pass
	@from_text = kryptonite_config_website_name
	
	mail(:to => kryptonite_user.email, :from => from, :subject => t("new_password_subject", :website_name=>kryptonite_config_website_name))
end

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



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

def new_user_information from, kryptonite_user, host, pass
   @name = kryptonite_user.name
	@host = host
	@login = kryptonite_user.
	@pass = pass
	@from_text = kryptonite_config_website_name
	
	mail(:to => kryptonite_user.email, :from => from, :subject => t("new_account_subject", :website_name=>kryptonite_config_website_name))
end

#password_reset_instructions(from, kryptonite_user, host) ⇒ Object



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

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

  mail(:to => kryptonite_user.email, :from => from, :subject => t("password_reset_subject", :website_name=>kryptonite_config_website_name))
end