mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-04 20:35:52 +08:00
starttls is implicitly enabled by default, we need to explicitly disable it if the user wants to do so Without doing so, the SMTP module would still attempt starttls if offered, but potentially with the wrong context. This has the potential side effect of leaving people with a non-working email configuration if they previously attempted to disable starttls but actually require it, so add a problem check to ensure that the admin is notified.
13 lines
221 B
Ruby
13 lines
221 B
Ruby
# frozen_string_literal: true
|
|
|
|
class ProblemCheck::StarttlsDisabled < ProblemCheck
|
|
self.priority = "high"
|
|
|
|
def call
|
|
if GlobalSetting.smtp_enable_start_tls
|
|
no_problem
|
|
else
|
|
problem
|
|
end
|
|
end
|
|
end
|