diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 243266f78..8730c2d2e 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -1,4 +1,4 @@ class ApplicationMailer < ActionMailer::Base - default from: "'Téléprocédures Simplifiées' " + default from: "'Téléprocédures Simplifiées' <#{I18n.t('dynamics.contact_email')}>" layout 'mailer' end diff --git a/app/mailers/notification_mailer.rb b/app/mailers/notification_mailer.rb index 9bf486f17..d2ddbb195 100644 --- a/app/mailers/notification_mailer.rb +++ b/app/mailers/notification_mailer.rb @@ -21,7 +21,7 @@ class NotificationMailer < ApplicationMailer def create_commentaire_for_notification Commentaire.create( dossier: @dossier, - email: "contact@tps.apientreprise.fr", + email: I18n.t("dynamics.contact_email"), body: ["[#{@obj}]", @body].join("

") ) end diff --git a/app/models/commentaire.rb b/app/models/commentaire.rb index 001976ab3..d62e87eac 100644 --- a/app/models/commentaire.rb +++ b/app/models/commentaire.rb @@ -17,7 +17,7 @@ class Commentaire < ActiveRecord::Base invited_users_emails = dossier.invites_user.pluck(:email).to_a case email - when "contact@tps.apientreprise.fr" + when I18n.t("dynamics.contact_email") # The commentaire is a copy of an automated notification email # we sent to a user, so do nothing when dossier_user_email, *invited_users_emails diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 37cbd567a..60f55f640 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -10,7 +10,7 @@ Devise.setup do |config| # Configure the e-mail address which will be shown in Devise::Mailer, # note that it will be overwritten if you use your own mailer class # with default "from" parameter. - config.mailer_sender = "'Téléprocédures Simplifiées' " + config.mailer_sender = "'Téléprocédures Simplifiées' <#{I18n.t('dynamics.contact_email')}>" # Configure the class responsible to send e-mails. # config.mailer = 'Devise::Mailer'