diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-07-02 08:04:56 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-07-02 08:42:47 +0200 |
commit | 33409319be610dfa525e27a9d3ebf124f89fc030 (patch) | |
tree | ece0bbe6128fd257d474adcd3c4674b3a94e071e /apps/provisioning_api/lib | |
parent | 7fbfa5cd99dca4260e7b819a2157f0421955ed10 (diff) | |
download | nextcloud-server-33409319be610dfa525e27a9d3ebf124f89fc030.tar.gz nextcloud-server-33409319be610dfa525e27a9d3ebf124f89fc030.zip |
Do not fail hard on new user mail error
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/provisioning_api/lib')
-rw-r--r-- | apps/provisioning_api/lib/Controller/UsersController.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index 93b5d62db36..1fa1f1fa5b3 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -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); } } |