aboutsummaryrefslogtreecommitdiff
path: root/src/emails/password_reset_request_email.cr
blob: a41c8ba12df0d19b8ba4d70d8455430986dbc037 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
class PasswordResetRequestEmail < BaseEmail
  Habitat.create { setting stubbed_token : String? }
  delegate stubbed_token, to: :settings

  def initialize(@user : User)
    @token = stubbed_token || Authentic.generate_password_reset_token(@user)
  end

  to @user
  from "myapp@support.com" # or set a default in src/emails/base_email.cr
  subject "Reset your password"
  templates html, text
end