demarches-normaliennes/app/mailers/administrateur_mailer.rb
2022-08-24 13:10:48 +02:00

24 lines
831 B
Ruby
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Preview all emails at http://localhost:3000/rails/mailers/administrateur_mailer
class AdministrateurMailer < ApplicationMailer
layout 'mailers/layout'
def activate_before_expiration(user, reset_password_token)
@user = user
@reset_password_token = reset_password_token
@expiration_date = @user.reset_password_sent_at + Devise.reset_password_within
@subject = "N'oubliez pas dactiver votre compte administrateur"
mail(to: user.email,
subject: @subject,
reply_to: CONTACT_EMAIL)
end
def notify_procedure_expires_when_termine_forced(user_email, procedure)
@procedure = procedure
@subject = "La suppression automatique des dossiers a été activée sur la démarche #{procedure.libelle}"
mail(to: user_email,
subject: @subject,
reply_to: CONTACT_EMAIL)
end
end