Skip to content

Commit

Permalink
#23 allow smtp configure without requiring smtp user
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexBTurchyn committed Jul 23, 2023
1 parent 2dcfc41 commit a92d1d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
config.action_mailer.raise_delivery_errors = false

if ENV['SMTP_USERNAME']
if ENV['SMTP_ADDRESS']
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: ENV.fetch('SMTP_ADDRESS', nil),
Expand All @@ -86,7 +86,7 @@
password: ENV.fetch('SMTP_PASSWORD', nil),
authentication: ENV.fetch('SMTP_AUTHENTICATION', 'plain'),
enable_starttls_auto: ENV['SMTP_ENABLE_STARTTLS_AUTO'] == 'true'
}
}.compact
end

# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
Expand Down

0 comments on commit a92d1d8

Please sign in to comment.