diff options
Diffstat (limited to 'core/lostpassword/controller.php')
-rw-r--r-- | core/lostpassword/controller.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/lostpassword/controller.php b/core/lostpassword/controller.php index 3ef8eaf71aa..fbcf4a87f22 100644 --- a/core/lostpassword/controller.php +++ b/core/lostpassword/controller.php @@ -44,7 +44,11 @@ class OC_Core_LostPassword_Controller { $msg = $tmpl->fetchPage(); $l = OC_L10N::get('core'); $from = OCP\Util::getDefaultEmailAddress('lostpassword-noreply'); - OC_Mail::send($email, $_POST['user'], $l->t('ownCloud password reset'), $msg, $from, 'ownCloud'); + try { + OC_Mail::send($email, $_POST['user'], $l->t('ownCloud password reset'), $msg, $from, 'ownCloud'); + } catch (Exception $e) { + OC_Template::printErrorPage( 'A problem occurs during sending the e-mail please contact your administrator.'); + } self::displayLostPasswordPage(false, true); } else { self::displayLostPasswordPage(true, false); |