diff --git a/app/mailers/administrateur_mailer.rb b/app/mailers/administrateur_mailer.rb index ad434724e..e41e9a88f 100644 --- a/app/mailers/administrateur_mailer.rb +++ b/app/mailers/administrateur_mailer.rb @@ -5,10 +5,10 @@ class AdministrateurMailer < ApplicationMailer @administrateur = administrateur @reset_password_token = reset_password_token @expiration_date = @administrateur.reset_password_sent_at + Devise.reset_password_within - subject = "N'oubliez pas d'activer votre compte administrateur" + @subject = "N'oubliez pas d'activer votre compte administrateur" mail(to: administrateur.email, - subject: subject, + subject: @subject, reply_to: CONTACT_EMAIL) end end diff --git a/app/mailers/gestionnaire_mailer.rb b/app/mailers/gestionnaire_mailer.rb index 421df8717..230e87fb5 100644 --- a/app/mailers/gestionnaire_mailer.rb +++ b/app/mailers/gestionnaire_mailer.rb @@ -22,9 +22,9 @@ class GestionnaireMailer < ApplicationMailer email = gestionnaire.email @overview = gestionnaire.last_week_overview headers['X-mailjet-campaign'] = 'last_week_overview' - subject = 'Votre activité hebdomadaire' + @subject = 'Votre activité hebdomadaire' - mail(to: email, subject: subject) + mail(to: email, subject: @subject) end def send_dossier(sender, dossier, recipient) diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index 2f1ae9873..c0b8a7547 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -3,7 +3,7 @@ class UserMailer < ApplicationMailer def new_account_warning(user) @user = user - subject = "Création de compte" + @subject = "Demande de création de compte" mail(to: user.email, subject: subject) end diff --git a/app/views/administrateur_mailer/activate_before_expiration.haml b/app/views/administrateur_mailer/activate_before_expiration.haml index c44d0c9ff..aaec3040e 100644 --- a/app/views/administrateur_mailer/activate_before_expiration.haml +++ b/app/views/administrateur_mailer/activate_before_expiration.haml @@ -1,4 +1,4 @@ -- content_for(:title, "N'oubliez pas d'activer votre compte") +- content_for(:title, @subject) Bonjour, %br diff --git a/app/views/gestionnaire_mailer/last_week_overview.html.haml b/app/views/gestionnaire_mailer/last_week_overview.html.haml index 5a0a23550..b564beb86 100644 --- a/app/views/gestionnaire_mailer/last_week_overview.html.haml +++ b/app/views/gestionnaire_mailer/last_week_overview.html.haml @@ -1,4 +1,4 @@ -- content_for(:title, 'Votre activité hebdomadaire') +- content_for(:title, @subject) - @overview[:procedure_overviews].each_with_index do |procedure_overview, index| diff --git a/app/views/user_mailer/new_account_warning.html.haml b/app/views/user_mailer/new_account_warning.html.haml index 3127c3674..09461b411 100644 --- a/app/views/user_mailer/new_account_warning.html.haml +++ b/app/views/user_mailer/new_account_warning.html.haml @@ -1,4 +1,4 @@ -- content_for(:title, 'Demande de création de compte') +- content_for(:title, @subject) %h1 Bonjour