Skip to content

Commit

Permalink
Ignore empty string in SMTP configuration (publiclab#9413)
Browse files Browse the repository at this point in the history
  • Loading branch information
icarito authored and reginaalyssa committed Oct 16, 2021
1 parent 2b79b51 commit 1697e09
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@
:port => ENV["SMTP_PORT"] || 25
}

if ENV["SMTP_USER"] then config.action_mailer.smtp_settings[:user_name] = ENV["SMTP_USER"] end
if ENV["SMTP_PASS"] then config.action_mailer.smtp_settings[:password] = ENV["SMTP_PASS"] end
if ENV["SMTP_AUTH"] then config.action_mailer.smtp_settings[:authentication] = ENV["SMTP_AUTH"] end
if ENV["SMTP_STLS"] then config.action_mailer.smtp_settings[:enable_starttls_auto] = ENV["SMTP_STLS"] end
if not ENV["SMTP_USER"].blank? then config.action_mailer.smtp_settings[:user_name] = ENV["SMTP_USER"] end
if not ENV["SMTP_PASS"].blank? then config.action_mailer.smtp_settings[:password] = ENV["SMTP_PASS"] end
if not ENV["SMTP_AUTH"].blank? then config.action_mailer.smtp_settings[:authentication] = ENV["SMTP_AUTH"] end
if not ENV["SMTP_STLS"].blank? then config.action_mailer.smtp_settings[:enable_starttls_auto] = ENV["SMTP_STLS"] end

# Enable threaded mode
# config.threadsafe!
Expand Down

0 comments on commit 1697e09

Please sign in to comment.