changed(brevo): use env vars for smtp relay address and port.

This commit is contained in:
Bastien Ogier 2023-09-06 11:24:23 +02:00
parent 0c004fd4e5
commit f7d109a851
2 changed files with 6 additions and 2 deletions

View file

@ -122,6 +122,10 @@ MATOMO_IFRAME_URL="https://matomo.example.org/index.php?module=CoreAdminHome&act
# DOLIST_NO_REPLY_EMAIL=""
# DOLIST_API_KEY=""
# SMTP Provider: SIB (Brevo)
# SENDINBLUE_SMTP_ADDRESS=""
# SENDINBLUE_SMTP_PORT=""
# Ratio of emails sent using SendInBlue
# When present, N % of emails will be sent using SendInBlue
# (and the others using the default SMTP provider)

View file

@ -10,9 +10,9 @@ if ENV.key?('SENDINBLUE_BALANCING_VALUE')
ActionMailer::Base.sendinblue_settings = {
user_name: Rails.application.secrets.sendinblue[:username],
password: Rails.application.secrets.sendinblue[:smtp_key],
address: 'smtp-relay.brevo.com',
address: ENV.fetch("SENDINBLUE_SMTP_ADDRESS", "smtp-relay.brevo.com"),
domain: 'smtp-relay.brevo.com',
port: '587',
port: ENV.fetch("SENDINBLUE_SMTP_PORT", "587"),
authentication: :cram_md5
}
end