From de5e8237e4bd8f3e325473c789fb542d01557f27 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Fri, 22 Sep 2023 17:26:27 +0200 Subject: [PATCH 1/2] fix(smtp): Allow specifying SSL settings --- config/environments/production.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index cf942cd6c70..39692890213 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -105,7 +105,8 @@ user_name: ENV.fetch("SMTP_USER"), password: ENV.fetch("SMTP_PASS"), authentication: ENV.fetch("SMTP_AUTHENTICATION"), - enable_starttls_auto: ENV.fetch("SMTP_TLS").present? + enable_starttls_auto: ENV.fetch("SMTP_TLS").present?, + ssl: ENV.fetch("SMTP_SSL").present? } elsif ENV['SENDMAIL_ENABLED'] == 'enabled' config.action_mailer.delivery_method = :sendmail From a406428ee761231c3e82dd5c8f5154d04474a238 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Mon, 25 Sep 2023 10:17:37 +0200 Subject: [PATCH 2/2] fix(smtp): Disambiguate configuration options for SMTP --- config/env.example.optional | 3 ++- config/environments/production.rb | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/config/env.example.optional b/config/env.example.optional index 050e5d49bec..25bea8328fb 100644 --- a/config/env.example.optional +++ b/config/env.example.optional @@ -206,7 +206,8 @@ SMTP_HOST="" SMTP_PORT="" SMTP_USER="" SMTP_PASS="" -SMTP_TLS="" +SMTP_STARTTLS="enabled" # Use any non-blank value to enable starttls +SMTP_TLS="" # Use any non-blank value to enable TLS SMTP_AUTHENTICATION="plain" # Sendmail diff --git a/config/environments/production.rb b/config/environments/production.rb index 39692890213..bc203bbbaab 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -105,8 +105,8 @@ user_name: ENV.fetch("SMTP_USER"), password: ENV.fetch("SMTP_PASS"), authentication: ENV.fetch("SMTP_AUTHENTICATION"), - enable_starttls_auto: ENV.fetch("SMTP_TLS").present?, - ssl: ENV.fetch("SMTP_SSL").present? + enable_starttls_auto: ENV.fetch("SMTP_STARTTLS", "enabled").present?, + tls: ENV.fetch("SMTP_TLS", "").present? } elsif ENV['SENDMAIL_ENABLED'] == 'enabled' config.action_mailer.delivery_method = :sendmail