Skip to content
Snippets Groups Projects
Unverified Commit 23bcb715 authored by John Molakvoæ's avatar John Molakvoæ Committed by GitHub
Browse files

Do not fail hard on new user mail error (#16183)

Do not fail hard on new user mail error
parents 9f7fca49 33409319
No related branches found
No related tags found
No related merge requests found
......@@ -328,12 +328,13 @@ class UsersController extends AUserData {
$emailTemplate = $this->newUserMailHelper->generateTemplate($newUser, $generatePasswordResetToken);
$this->newUserMailHelper->sendMail($newUser, $emailTemplate);
} catch (\Exception $e) {
// Mail could be failing hard or just be plain not configured
// Logging error as it is the hardest of the two
$this->logger->logException($e, [
'message' => "Can't send new user mail to $email",
'message' => "Unable to send the invitation mail to $email",
'level' => ILogger::ERROR,
'app' => 'ocs_api',
]);
throw new OCSException('Unable to send the invitation mail', 109);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment