Add message when trouble sending email ref #1799
This commit is contained in:
parent
59fd9b2bd2
commit
4f4e81d3d2
|
@ -44,7 +44,11 @@ class OC_Core_LostPassword_Controller {
|
||||||
$msg = $tmpl->fetchPage();
|
$msg = $tmpl->fetchPage();
|
||||||
$l = OC_L10N::get('core');
|
$l = OC_L10N::get('core');
|
||||||
$from = OCP\Util::getDefaultEmailAddress('lostpassword-noreply');
|
$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);
|
self::displayLostPasswordPage(false, true);
|
||||||
} else {
|
} else {
|
||||||
self::displayLostPasswordPage(true, false);
|
self::displayLostPasswordPage(true, false);
|
||||||
|
|
Loading…
Reference in New Issue