Class: Bolt::BoltNotification

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

Instance Method Summary collapse

Instance Method Details

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



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

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

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



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

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

#password_reset_instructions(from, bolt_user, host) ⇒ Object



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

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

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