Skip to content

Commit

Permalink
Merge pull request #9462 from zeylos/brevo_env_smtp_address
Browse files Browse the repository at this point in the history
changed(brevo): use env vars for smtp relay address and port.
  • Loading branch information
colinux authored Sep 6, 2023
2 parents 3cddd0c + f7d109a commit 0e6301a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions config/env.example.optional
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions config/initializers/sendinblue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ class SMTP < ::Mail::SMTP; end
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
Expand Down

0 comments on commit 0e6301a

Please sign in to comment.