summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-02-20 12:36:07 -0800
committerBernhard Posselt <nukeawhale@gmail.com>2013-02-20 12:36:07 -0800
commitfbfd54d2a057a0d9fb5c1e82bac6ed9936318a78 (patch)
treee5de2c4a55041314608d23c474f98f09e82843c8
parent59fd9b2bd2a23e008a0be3180a423276d7a00f35 (diff)
parent4f4e81d3d273d31686b177e2533991c7f078fee4 (diff)
downloadnextcloud-server-fbfd54d2a057a0d9fb5c1e82bac6ed9936318a78.tar.gz
nextcloud-server-fbfd54d2a057a0d9fb5c1e82bac6ed9936318a78.zip
Merge pull request #1806 from eMerzh/ref_1799
Add message when trouble sending email ref #1799
-rw-r--r--core/lostpassword/controller.php6
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);