diff options
author | Miguel Jacq <mig@mig5.net> | 2017-04-20 11:12:14 +1000 |
---|---|---|
committer | Eugen <eugen@zeonfederated.com> | 2017-04-20 03:12:14 +0200 |
commit | b79ba3db8a2c494b994f7cb7b6e70d8f945f8820 (patch) | |
tree | 94da5f76db4e86036cc06fee0d8cb6c5c46b3d54 /config/environments/production.rb | |
parent | 59a77923b368d48c590cd9f4a0c6b73ce972d33f (diff) |
Send nil for SMTP_LOGIN or SMTP_PASSWORD if it was left blank in the envfile, otherwise Ruby still attempts auth even if SMTP_AUTH_METHOD is none (#2180)
Diffstat (limited to 'config/environments/production.rb')
-rw-r--r-- | config/environments/production.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/config/environments/production.rb b/config/environments/production.rb index a4cdb273232..eff4c293f14 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -98,12 +98,10 @@ Rails.application.configure do config.action_mailer.smtp_settings = { :port => ENV['SMTP_PORT'], :address => ENV['SMTP_SERVER'], - :user_name => ENV['SMTP_LOGIN'], - :password => ENV['SMTP_PASSWORD'], - + :user_name => ENV['SMTP_LOGIN'].presence, + :password => ENV['SMTP_PASSWORD'].presence, :domain => ENV['SMTP_DOMAIN'] || ENV['LOCAL_DOMAIN'], :authentication => ENV['SMTP_AUTH_METHOD'] == 'none' ? nil : ENV['SMTP_AUTH_METHOD'] || :plain, - :openssl_verify_mode => ENV['SMTP_OPENSSL_VERIFY_MODE'], :enable_starttls_auto => ENV['SMTP_ENABLE_STARTTLS_AUTO'] || true, } |