fix smtp without password

This commit is contained in:
Pete Matsyburka
2024-10-05 13:15:25 +03:00
committed by Oleksandr Turchyn
parent dea80a82d8
commit b4dba0d809
4 changed files with 7 additions and 9 deletions
+1 -1
View File
@@ -87,7 +87,7 @@ Rails.application.configure do
domain: ENV.fetch('SMTP_DOMAIN', nil),
user_name: ENV.fetch('SMTP_USERNAME', nil),
password: ENV.fetch('SMTP_PASSWORD', nil),
authentication: ENV.fetch('SMTP_AUTHENTICATION', 'plain'),
authentication: ENV.fetch('SMTP_PASSWORD', nil).present? ? ENV.fetch('SMTP_AUTHENTICATION', 'plain') : nil,
enable_starttls_auto: ENV['SMTP_ENABLE_STARTTLS_AUTO'] != 'false'
}.compact
end