2018-11-20 11:57:51 +01:00
|
|
|
# Preview all emails at http://localhost:3000/rails/mailers/user_mailer
|
2018-05-23 11:27:33 +02:00
|
|
|
class UserMailer < ApplicationMailer
|
2020-02-11 18:17:09 +01:00
|
|
|
helper MailerHelper
|
|
|
|
|
2018-05-23 11:27:33 +02:00
|
|
|
layout 'mailers/layout'
|
|
|
|
|
2020-02-11 18:17:09 +01:00
|
|
|
def new_account_warning(user, procedure = nil)
|
2018-05-23 11:27:33 +02:00
|
|
|
@user = user
|
2018-05-31 16:41:58 +02:00
|
|
|
@subject = "Demande de création de compte"
|
2020-02-11 18:17:09 +01:00
|
|
|
@procedure = procedure
|
2018-05-31 23:58:10 +02:00
|
|
|
|
2020-02-11 18:17:09 +01:00
|
|
|
mail(to: user.email, subject: @subject, procedure: @procedure)
|
2018-05-23 11:27:33 +02:00
|
|
|
end
|
2019-07-09 17:08:27 +02:00
|
|
|
|
2021-10-26 13:36:14 +02:00
|
|
|
def ask_for_merge(user, requested_email)
|
2019-07-09 17:08:27 +02:00
|
|
|
@user = user
|
|
|
|
@requested_email = requested_email
|
2021-10-26 13:36:14 +02:00
|
|
|
@subject = "Fusion de compte"
|
2019-07-09 17:08:27 +02:00
|
|
|
|
|
|
|
mail(to: requested_email, subject: @subject)
|
|
|
|
end
|
2019-08-07 15:52:38 +02:00
|
|
|
|
2021-11-17 16:21:55 +01:00
|
|
|
def france_connect_merge_confirmation(email, merge_token)
|
|
|
|
@merge_token = merge_token
|
|
|
|
@subject = "Veuillez confirmer la fusion de compte"
|
|
|
|
|
|
|
|
mail(to: email, subject: @subject)
|
|
|
|
end
|
|
|
|
|
2019-08-07 15:52:38 +02:00
|
|
|
def invite_instructeur(user, reset_password_token)
|
|
|
|
@reset_password_token = reset_password_token
|
|
|
|
@user = user
|
|
|
|
subject = "Activez votre compte instructeur"
|
|
|
|
|
|
|
|
mail(to: user.email,
|
|
|
|
subject: subject,
|
|
|
|
reply_to: CONTACT_EMAIL)
|
|
|
|
end
|
2018-05-23 11:27:33 +02:00
|
|
|
end
|