mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 02:48:28 +08:00
FIX: Make disabling TLS in mail possible again
Following the Rails 7 upgrade, the `DISCOURSE_SMTP_ENABLE_START_TLS` setting doesn’t work anymore. This is because Rails upgraded the `net-smtp` gem to the 0.3.1 version which enables `starttls` by default. The `mail` gem doesn’t support this new behavior yet and doesn’t know how to disable TLS. This should be fixed in an upcoming release. Meanwhile applying this patch allows us to get back the previous behavior which is expected by many.
This commit is contained in:

committed by
Loïc Guitaut

parent
284db78055
commit
fff3ff11c0
@ -41,7 +41,7 @@ Discourse::Application.configure do
|
||||
settings[:tls] = true
|
||||
end
|
||||
|
||||
config.action_mailer.smtp_settings = settings.reject { |_, y| y.nil? }
|
||||
config.action_mailer.smtp_settings = settings.compact
|
||||
else
|
||||
config.action_mailer.delivery_method = :sendmail
|
||||
config.action_mailer.sendmail_settings = { arguments: '-i' }
|
||||
|
Reference in New Issue
Block a user