From b8de5e0d0973d5fcf72898245ef430ff85806861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Mon, 20 Jan 2025 17:12:19 +0100 Subject: [PATCH] fix(settings): Fix setup check when mail_smptmode is set to "null" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- apps/settings/lib/SetupChecks/EmailTestSuccessful.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/settings/lib/SetupChecks/EmailTestSuccessful.php b/apps/settings/lib/SetupChecks/EmailTestSuccessful.php index a8f527f9dba45..8cad8e8215610 100644 --- a/apps/settings/lib/SetupChecks/EmailTestSuccessful.php +++ b/apps/settings/lib/SetupChecks/EmailTestSuccessful.php @@ -46,7 +46,9 @@ protected function wasEmailTestSuccessful(): bool { } public function run(): SetupResult { - if ($this->wasEmailTestSuccessful()) { + if ($this->config->getSystemValueString('mail_smtpmode', 'smtp') === 'null') { + return SetupResult::success($this->l10n->t('Mail delivery is disabled by instance config "%s".', ['mail_smtpmode'])); + } elseif ($this->wasEmailTestSuccessful()) { return SetupResult::success($this->l10n->t('Email test was successfully sent')); } else { // If setup check could link to settings pages, this one should link to OC.generateUrl('/settings/admin')