diff --git a/app/models/dynamic_smtp_settings_interceptor.rb b/app/models/dynamic_smtp_settings_interceptor.rb index bbd702420..885c4b8e9 100644 --- a/app/models/dynamic_smtp_settings_interceptor.rb +++ b/app/models/dynamic_smtp_settings_interceptor.rb @@ -4,7 +4,7 @@ class DynamicSmtpSettingsInterceptor if rand(0..99) < ENV['SENDINBLUE_BALANCING_VALUE'].to_i message.delivery_method.settings = { user_name: ENV['SENDINBLUE_USER_NAME'], - password: ENV['SENDINBLUE_CLIENT_KEY'], + password: ENV['SENDINBLUE_SMTP_KEY'], address: 'smtp-relay.sendinblue.com', domain: 'smtp-relay.sendinblue.com', port: '587', diff --git a/config/env.example b/config/env.example index 143e586ed..c3c40d089 100644 --- a/config/env.example +++ b/config/env.example @@ -50,6 +50,7 @@ SENDINBLUE_BALANCING="" SENDINBLUE_BALANCING_VALUE="" SENDINBLUE_ENABLED="" SENDINBLUE_CLIENT_KEY="" +SENDINBLUE_SMTP_KEY="" SENDINBLUE_USER_NAME="" diff --git a/config/environments/development.rb b/config/environments/development.rb index 1018ab6cf..718db3436 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -50,7 +50,7 @@ Rails.application.configure do config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { user_name: Rails.application.secrets.sendinblue[:username], - password: Rails.application.secrets.sendinblue[:client_key], + password: Rails.application.secrets.sendinblue[:smtp_key], address: 'smtp-relay.sendinblue.com', domain: 'smtp-relay.sendinblue.com', port: '587', diff --git a/config/environments/production.rb b/config/environments/production.rb index 38de5db80..262c15c4b 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -81,7 +81,7 @@ Rails.application.configure do config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { user_name: Rails.application.secrets.sendinblue[:username], - password: Rails.application.secrets.sendinblue[:client_key], + password: Rails.application.secrets.sendinblue[:smtp_key], address: 'smtp-relay.sendinblue.com', domain: 'smtp-relay.sendinblue.com', port: '587', diff --git a/config/secrets.yml b/config/secrets.yml index c0989401f..2ac8aa244 100644 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -56,6 +56,7 @@ defaults: &defaults enabled: <%= ENV['SENDINBLUE_ENABLED'] == 'enabled' %> username: <%= ENV['SENDINBLUE_USER_NAME'] %> client_key: <%= ENV['SENDINBLUE_CLIENT_KEY'] %> + smtp_key: <%= ENV['SENDINBLUE_SMTP_KEY'] %> api_v3_key: <%= ENV['SENDINBLUE_API_V3_KEY'] %> matomo: enabled: <%= ENV['MATOMO_ENABLED'] == 'enabled' %>