demarches-normaliennes/app/mailers/user_mailer.rb

30 lines
754 B
Ruby
Raw Normal View History

# Preview all emails at http://localhost:3000/rails/mailers/user_mailer
class UserMailer < ApplicationMailer
layout 'mailers/layout'
def new_account_warning(user)
@user = user
@subject = "Demande de création de compte"
2018-05-31 23:58:10 +02:00
mail(to: user.email, subject: @subject)
end
def account_already_taken(user, requested_email)
@user = user
@requested_email = requested_email
@subject = "Changement dadresse email"
mail(to: requested_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
end