Mutualize the email address in a localised string
This commit is contained in:
parent
7f9c271938
commit
8ba55a0d5d
4 changed files with 4 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
||||||
class ApplicationMailer < ActionMailer::Base
|
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'
|
layout 'mailer'
|
||||||
end
|
end
|
||||||
|
|
|
@ -21,7 +21,7 @@ class NotificationMailer < ApplicationMailer
|
||||||
def create_commentaire_for_notification
|
def create_commentaire_for_notification
|
||||||
Commentaire.create(
|
Commentaire.create(
|
||||||
dossier: @dossier,
|
dossier: @dossier,
|
||||||
email: "contact@tps.apientreprise.fr",
|
email: I18n.t("dynamics.contact_email"),
|
||||||
body: ["[#{@obj}]", @body].join("<br><br>")
|
body: ["[#{@obj}]", @body].join("<br><br>")
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
|
@ -17,7 +17,7 @@ class Commentaire < ActiveRecord::Base
|
||||||
invited_users_emails = dossier.invites_user.pluck(:email).to_a
|
invited_users_emails = dossier.invites_user.pluck(:email).to_a
|
||||||
|
|
||||||
case email
|
case email
|
||||||
when "contact@tps.apientreprise.fr"
|
when I18n.t("dynamics.contact_email")
|
||||||
# The commentaire is a copy of an automated notification email
|
# The commentaire is a copy of an automated notification email
|
||||||
# we sent to a user, so do nothing
|
# we sent to a user, so do nothing
|
||||||
when dossier_user_email, *invited_users_emails
|
when dossier_user_email, *invited_users_emails
|
||||||
|
|
|
@ -10,7 +10,7 @@ Devise.setup do |config|
|
||||||
# Configure the e-mail address which will be shown in Devise::Mailer,
|
# 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
|
# note that it will be overwritten if you use your own mailer class
|
||||||
# with default "from" parameter.
|
# 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.
|
# Configure the class responsible to send e-mails.
|
||||||
# config.mailer = 'Devise::Mailer'
|
# config.mailer = 'Devise::Mailer'
|
||||||
|
|
Loading…
Reference in a new issue