From 3a37a7f6b4513cf16ede0b5d8bf56cfa8e604530 Mon Sep 17 00:00:00 2001 From: Roland Date: Mon, 15 Aug 2022 17:14:09 +0200 Subject: [PATCH] FEATURE: Allow configuration of smtp timeout settings (#17863) Adds DISCOURSE_SMTP_OPEN_TIMEOUT and DISCOURSE_SMTP_READ_TIMEOUT GlobalSettings that allow site admins to configure the SMTP connection behavior to match the needs of their SMTP server. --- 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 5f05f6e9b33..6b73c82e9df 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -32,7 +32,9 @@ Discourse::Application.configure do user_name: GlobalSetting.smtp_user_name, password: GlobalSetting.smtp_password, authentication: GlobalSetting.smtp_authentication, - enable_starttls_auto: GlobalSetting.smtp_enable_start_tls + enable_starttls_auto: GlobalSetting.smtp_enable_start_tls, + open_timeout: GlobalSetting.smtp_open_timeout, + read_timeout: GlobalSetting.smtp_read_timeout } settings[:openssl_verify_mode] = GlobalSetting.smtp_openssl_verify_mode if GlobalSetting.smtp_openssl_verify_mode