Merge pull request #50556 from nextcloud/backport/50281/stable31

[stable31] fix(settings): Fix setup check when mail_smptmode is set to "null"
This commit is contained in:
Andy Scherzinger 2025-01-30 13:02:14 +01:00 committed by GitHub
commit 9c3dc03945
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -46,7 +46,9 @@ class EmailTestSuccessful implements ISetupCheck {
}
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')