From bfeb504243e53a75084ffbc2400cfe5b3f3bcf27 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Wed, 9 Aug 2023 08:18:49 +0300 Subject: [PATCH] ref --- .../Espo/Tools/UserSecurity/Password/RecoveryService.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/application/Espo/Tools/UserSecurity/Password/RecoveryService.php b/application/Espo/Tools/UserSecurity/Password/RecoveryService.php index 4f6b27c896..f30997de1d 100644 --- a/application/Espo/Tools/UserSecurity/Password/RecoveryService.php +++ b/application/Espo/Tools/UserSecurity/Password/RecoveryService.php @@ -310,7 +310,12 @@ class RecoveryService $this->createCleanupRequestJob($entity->getId(), $lifetime); - $this->send($entity->getRequestId(), $emailAddress, $user); + try { + $this->send($entity->getRequestId(), $emailAddress, $user); + } + catch (SendingError $e) { + throw new Error("Email sending error. " . $e->getMessage()); + } return $entity; }