Class: CommandTower::PasswordResetMailer
- Inherits:
-
ApplicationMailer
- Object
- ActionMailer::Base
- ApplicationMailer
- CommandTower::PasswordResetMailer
- Defined in:
- app/mailers/command_tower/password_reset_mailer.rb
Constant Summary
Constants inherited from ApplicationMailer
ApplicationMailer::FALLBACK_FROM
Instance Method Summary collapse
Methods inherited from ApplicationMailer
smtp_from_address, #smtp_from_address
Instance Method Details
#reset_password(email, user, token, template_name: nil) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/mailers/command_tower/password_reset_mailer.rb', line 5 def reset_password(email, user, token, template_name: nil) subject = "Reset Your Password for #{CommandTower.config.app.communication_name}" @user = user @token = token @email = email password_reset_config = CommandTower.config.login.plain_text.password_reset @require_email = password_reset_config.require_email @reset_password_path = password_reset_config.reset_password_path template = template_name || password_reset_config.custom_template_name || "reset_password" mail(to: email, subject:, template_name: template) end |