Merge pull request #9462 from zeylos/brevo_env_smtp_address

changed(brevo): use env vars for smtp relay address and port.
This commit is contained in:
Colin Darie 2023-09-06 11:13:54 +00:00 committed by GitHub
commit 0e6301a08a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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