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
|
|
|
|
|
layout 'mailers/layout'
|
|
|
|
|
|
|
|
|
|
def new_account_warning(user)
|
|
|
|
|
@user = user
|
2018-05-31 16:41:58 +02:00
|
|
|
|
@subject = "Demande de création de compte"
|
2018-05-31 23:58:10 +02:00
|
|
|
|
|
2018-06-07 15:05:30 +02:00
|
|
|
|
mail(to: user.email, subject: @subject)
|
2018-05-23 11:27:33 +02:00
|
|
|
|
end
|
2019-07-09 17:08:27 +02:00
|
|
|
|
|
|
|
|
|
def account_already_taken(user, requested_email)
|
|
|
|
|
@user = user
|
|
|
|
|
@requested_email = requested_email
|
|
|
|
|
@subject = "Changement d’adresse email"
|
|
|
|
|
|
|
|
|
|
mail(to: requested_email, subject: @subject)
|
|
|
|
|
end
|
2018-05-23 11:27:33 +02:00
|
|
|
|
end
|