demarches-normaliennes/app/mailers/administration_mailer.rb
2024-05-31 14:53:50 +02:00

31 lines
779 B
Ruby

# Preview all emails at http://localhost:3000/rails/mailers/administration_mailer
class AdministrationMailer < ApplicationMailer
layout 'mailers/layout'
def invite_admin(user, reset_password_token)
@reset_password_token = reset_password_token
@user = user
@author_name = "Équipe de #{APPLICATION_NAME}"
subject = "Activez votre compte administrateur"
bypass_unverified_mail_protection!
mail(to: user.email,
subject: subject,
reply_to: CONTACT_EMAIL)
end
def refuse_admin(admin_email)
subject = "Votre demande de compte a été refusée"
bypass_unverified_mail_protection!
mail(to: admin_email,
subject: subject,
reply_to: CONTACT_EMAIL)
end
def self.critical_email?(action_name)
false
end
end