diff --git a/config/environments/production.rb b/config/environments/production.rb index eb0760c9..8ead5001 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -85,6 +85,7 @@ Rails.application.configure do domain: ENV.fetch('SMTP_DOMAIN', nil), user_name: ENV.fetch('SMTP_USERNAME', nil), 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' }.compact