Merge pull request #290 from sgmap/mutualise-email

Mutualize the email address in a localised string
This commit is contained in:
Mathieu Magnin 2017-05-12 17:04:00 +02:00 committed by GitHub
commit 4b1c96cdff
4 changed files with 4 additions and 4 deletions

View file

@ -1,4 +1,4 @@
class ApplicationMailer < ActionMailer::Base
default from: "'Téléprocédures Simplifiées' <contact@tps.apientreprise.fr>"
default from: "'Téléprocédures Simplifiées' <#{I18n.t('dynamics.contact_email')}>"
layout 'mailer'
end

View file

@ -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("<br><br>")
)
end

View file

@ -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

View file

@ -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' <contact@tps.apientreprise.fr>"
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'