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; }