demarches-normaliennes/app/mailers/api_token_mailer.rb

21 lines
533 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2024-01-23 17:21:30 +01:00
# Preview all emails at http://localhost:3000/rails/mailers/api_token_mailer
class APITokenMailer < ApplicationMailer
helper MailerHelper
layout 'mailers/layout'
def expiration(api_token)
@api_token = api_token
user = api_token.administrateur.user
subject = "Votre jeton d'accès à la plateforme #{Current.application_name} expire le #{l(@api_token.expires_at, format: :long)}"
2024-01-23 17:21:30 +01:00
mail(to: user.email, subject:)
end
def self.critical_email?(action_name)
false
end
end