Skip to content

Commit 980c243

Browse files
committed
fix(settings): log exception when test email fails
Signed-off-by: Abhinav Ohri <[email protected]>
1 parent babab82 commit 980c243

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

apps/settings/lib/Controller/MailSettingsController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ public function sendTestMail() {
147147
return new DataResponse();
148148
} catch (\Exception $e) {
149149
$this->config->setAppValue('core', 'emailTestSuccessful', '0');
150+
$this->logger->error('Failed sending test email: ' . $e->getMessage(), ['exception' => $e]);
150151
return new DataResponse($this->l10n->t('A problem occurred while sending the email. Please revise your settings. (Error: %s)', [$e->getMessage()]), Http::STATUS_BAD_REQUEST);
151152
}
152153
}

0 commit comments

Comments
 (0)