Skip to content

Commit

Permalink
fix(settings): Fix setup check when mail_smptmode is set to "null"
Browse files Browse the repository at this point in the history
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Jan 20, 2025
1 parent c1b3f6a commit b8de5e0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/settings/lib/SetupChecks/EmailTestSuccessful.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit b8de5e0

Please sign in to comment.