discourse/app/services/problem_check/starttls_disabled.rb
Michael Brown 2354eb3419 FIX: actually disable SMTP starttls if the user is attempting to disable it
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.
2025-11-04 23:42:14 -05:00

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