Feat: allow emails senders to be configured in .env file

Refs: #5408
This commit is contained in:
Fabrice Gangler 2020-07-15 16:53:22 +02:00
parent 7f22cc86a9
commit 1352cde321
2 changed files with 14 additions and 6 deletions

View file

@ -6,5 +6,13 @@ APPLICATION_NAME="demarches-simplifiees.fr"
APPLICATION_SHORTNAME="d-s.fr"
APPLICATION_BASE_URL="https://www.demarches-simplifiees.fr"
# Personnalisation d'instance - Adresses Email de l'application et téléphone
# CONTACT_EMAIL=""
# EQUIPE_EMAIL=""
# TECH_EMAIL=""
# NO_REPLY_EMAIL=""
# OLD_CONTACT_EMAIL=""
# CONTACT_PHONE=""
# Personnalisation d'instance - Page externe "Disponibilité" (status page)
# STATUS_PAGE_URL=""

View file

@ -1,12 +1,12 @@
# rubocop:disable DS/ApplicationName
# todo: will be externally configurable
if !defined?(CONTACT_EMAIL)
CONTACT_EMAIL = "contact@demarches-simplifiees.fr"
EQUIPE_EMAIL = "equipe@demarches-simplifiees.fr"
TECH_EMAIL = "tech@demarches-simplifiees.fr"
NO_REPLY_EMAIL = "Ne pas répondre <ne-pas-repondre@demarches-simplifiees.fr>"
CONTACT_PHONE = "01 76 42 02 87"
CONTACT_EMAIL = ENV.fetch("CONTACT_EMAIL", "contact@demarches-simplifiees.fr")
EQUIPE_EMAIL = ENV.fetch("EQUIPE_EMAIL", "equipe@demarches-simplifiees.fr")
TECH_EMAIL = ENV.fetch("TECH_EMAIL", "tech@demarches-simplifiees.fr")
NO_REPLY_EMAIL = ENV.fetch("NO_REPLY_EMAIL", "Ne pas répondre <ne-pas-repondre@demarches-simplifiees.fr>")
CONTACT_PHONE = ENV.fetch("CONTACT_PHONE", "01 76 42 02 87")
OLD_CONTACT_EMAIL = "contact@tps.apientreprise.fr"
OLD_CONTACT_EMAIL = ENV.fetch("OLD_CONTACT_EMAIL", "contact@tps.apientreprise.fr")
end
# rubocop:enable DS/ApplicationName