· 8 years ago · Mar 16, 2018, 05:54 PM
1class Notifier < ActionMailer::Base
2 default_url_options[:host] = "localhost:3006"
3
4def password_reset_instructions(user)
5
6 subject "Password Reset Instructions"
7 recipients user.email
8 from "Test <**********@gmail.com.>"
9 sent_on Time.now
10
11 body :edit_password_reset_url => edit_password_reset_url(user.perishable_token)
12 end
13
14end
15
16
17
18#user model
19
20def deliver_password_reset_instructions!
21 reset_perishable_token!
22 Notifier.deliver_password_reset_instructions(self)
23 end