2018-11-20 11:57:51 +01:00
|
|
|
|
# Preview all emails at http://localhost:3000/rails/mailers/administrateur_mailer
|
2018-04-05 12:36:29 +02:00
|
|
|
|
class AdministrateurMailer < ApplicationMailer
|
|
|
|
|
layout 'mailers/layout'
|
|
|
|
|
|
2019-08-09 16:04:28 +02:00
|
|
|
|
def activate_before_expiration(user, reset_password_token)
|
|
|
|
|
@user = user
|
2018-05-03 18:30:40 +02:00
|
|
|
|
@reset_password_token = reset_password_token
|
2019-08-09 16:04:28 +02:00
|
|
|
|
@expiration_date = @user.reset_password_sent_at + Devise.reset_password_within
|
2021-05-26 15:16:30 +02:00
|
|
|
|
@subject = "N'oubliez pas d’activer votre compte administrateur"
|
2018-05-31 23:58:10 +02:00
|
|
|
|
|
2019-08-09 16:04:28 +02:00
|
|
|
|
mail(to: user.email,
|
2018-09-20 14:34:49 +02:00
|
|
|
|
subject: @subject,
|
|
|
|
|
reply_to: CONTACT_EMAIL)
|
2018-04-05 12:36:29 +02:00
|
|
|
|
end
|
|
|
|
|
end
|