From b50d9824975284620fba6f69782291b1706f896b Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Tue, 3 Mar 2026 22:49:55 +0200 Subject: [PATCH] smtp timeout env vars --- config/environments/production.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index 8ead5001..3b0bac00 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -87,7 +87,9 @@ Rails.application.configure do password: ENV.fetch('SMTP_PASSWORD', nil), openssl_verify_mode: ENV['SMTP_SSL_VERIFY'] == 'false' ? OpenSSL::SSL::VERIFY_NONE : OpenSSL::SSL::VERIFY_PEER, authentication: ENV.fetch('SMTP_PASSWORD', nil).present? ? ENV.fetch('SMTP_AUTHENTICATION', 'plain') : nil, - enable_starttls: ENV['SMTP_ENABLE_STARTTLS'] != 'false' + enable_starttls: ENV['SMTP_ENABLE_STARTTLS'] != 'false', + open_timeout: ENV.fetch('SMTP_OPEN_TIMEOUT', '15').to_i, + read_timeout: ENV.fetch('SMTP_READ_TIMEOUT', '25').to_i }.compact end