demarches-normaliennes/app/mailers/administration_mailer.rb

32 lines
779 B
Ruby
Raw Normal View History

# Preview all emails at http://localhost:3000/rails/mailers/administration_mailer
class AdministrationMailer < ApplicationMailer
layout 'mailers/layout'
def invite_admin(user, reset_password_token)
2018-01-11 14:17:37 +01:00
@reset_password_token = reset_password_token
@user = user
@author_name = "Équipe de #{APPLICATION_NAME}"
subject = "Activez votre compte administrateur"
2018-05-31 23:58:10 +02:00
bypass_unverified_mail_protection!
mail(to: user.email,
subject: subject,
reply_to: CONTACT_EMAIL)
2018-01-11 14:17:37 +01:00
end
def refuse_admin(admin_email)
subject = "Votre demande de compte a été refusée"
2018-05-31 15:26:02 +02:00
bypass_unverified_mail_protection!
mail(to: admin_email,
subject: subject,
reply_to: CONTACT_EMAIL)
end
def self.critical_email?(action_name)
false
end
2016-02-23 16:51:24 +01:00
end