demarches-normaliennes/app/mailers/administration_mailer.rb

40 lines
1.1 KiB
Ruby
Raw Normal View History

class AdministrationMailer < ApplicationMailer
layout 'mailers/layout'
def new_admin_email(admin, administration)
2016-02-23 16:51:24 +01:00
@admin = admin
@administration = administration
2018-05-31 15:50:13 +02:00
subject = "Création d'un compte admininistrateur"
2016-02-23 16:51:24 +01:00
2018-05-31 15:43:57 +02:00
mail(to: TECH_EMAIL,
2018-05-31 15:26:02 +02:00
subject: subject)
2016-02-23 16:51:24 +01:00
end
def invite_admin(admin, reset_password_token, administration_id)
2018-01-11 14:17:37 +01:00
@reset_password_token = reset_password_token
@admin = admin
@author_name = BizDev.full_name(administration_id)
subject = "Activez votre compte administrateur"
2018-05-31 23:58:10 +02:00
2018-01-11 14:17:37 +01:00
mail(to: admin.email,
2018-05-31 15:26:02 +02:00
subject: subject,
2018-05-31 15:43:57 +02:00
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
mail(to: admin_email,
2018-05-31 15:26:02 +02:00
subject: subject,
2018-05-31 15:43:57 +02:00
reply_to: CONTACT_EMAIL)
end
def dubious_procedures(procedures_and_type_de_champs)
@procedures_and_type_de_champs = procedures_and_type_de_champs
2018-05-31 15:26:02 +02:00
subject = "[RGS] De nouvelles procédures comportent des champs interdits"
2018-05-31 23:58:10 +02:00
2018-05-31 15:43:57 +02:00
mail(to: EQUIPE_EMAIL,
2018-05-31 15:26:02 +02:00
subject: subject)
end
2016-02-23 16:51:24 +01:00
end