diff --git a/app/mailers/reset_c_panel_password_mailer.rb b/app/mailers/reset_c_panel_password_mailer.rb index 4ff99cf..3b23684 100644 --- a/app/mailers/reset_c_panel_password_mailer.rb +++ b/app/mailers/reset_c_panel_password_mailer.rb @@ -5,12 +5,15 @@ class ResetCPanelPasswordMailer < ActionMailer::Base email = user.email @reset_token = user.reset_token @user_id = user.id + @url = "http://#{request.host_with_port}/cpanel/reset_password?id=#{@user_id}&token=#{@reset_token}" mail(:to => email, :subject => "Reset Password Instructions") end def send_user_confirmation(user) @confirmation_token = user.confirmation_token @user_id = user.id + confirm_email + @url = "http://#{request.host_with_port}/cpanel/confirm_email?id=#{@user_id}&token=#{@confirmation_token}" mail(:to => user.email, :subject => "Orbit - Confirm Email") end end diff --git a/app/views/reset_c_panel_password_mailer/reset_user_password.html.erb b/app/views/reset_c_panel_password_mailer/reset_user_password.html.erb index f22ae1b..b44b51c 100644 --- a/app/views/reset_c_panel_password_mailer/reset_user_password.html.erb +++ b/app/views/reset_c_panel_password_mailer/reset_user_password.html.erb @@ -1,3 +1,3 @@
Please Reset your password with the following instructions
-<%= link_to 'Click here to reset', "http://#{request.host_with_port}/cpanel/reset_password?id=#{@user_id}&token=#{@reset_token}" %> \ No newline at end of file +<%= link_to 'Click here to reset', @url %> \ No newline at end of file diff --git a/app/views/reset_c_panel_password_mailer/send_user_confirmation.html.erb b/app/views/reset_c_panel_password_mailer/send_user_confirmation.html.erb index 7378ce9..c9bd62c 100644 --- a/app/views/reset_c_panel_password_mailer/send_user_confirmation.html.erb +++ b/app/views/reset_c_panel_password_mailer/send_user_confirmation.html.erb @@ -1,3 +1,3 @@Please confirm email by clicking on the link.
-<%= link_to 'Click here to confirm', "http://#{request.host_with_port}/cpanel/reset_password?id=#{@user_id}&token=#{@reset_token}" %> \ No newline at end of file +<%= link_to 'Click here to confirm', @url %> \ No newline at end of file