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')