Merge pull request #2666 from mecab/fix-contact-form

Fix errors while sending mail is not displayed in contact form.
This commit is contained in:
Sebastian Grewe 2018-02-01 09:51:38 +01:00 committed by GitHub
commit 3cb167a70e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,7 +25,7 @@ if ($setting->getValue('acl_contactform') == 2) {
if ($mail->contactform($_POST['senderName'], $_POST['senderEmail'], $_POST['senderSubject'], $_POST['senderMessage'])) {
$_SESSION['POPUP'][] = array('CONTENT' => 'Thanks for sending your message! We will get back to you shortly');
} else {
$_SESSION['POPUP'][] = array('CONTENT' => 'There was a problem sending your message. Please try again. ' . $user->getError(), 'TYPE' => 'alert alert-danger');
$_SESSION['POPUP'][] = array('CONTENT' => 'There was a problem sending your message. Check following error and please try again: ' . $mail->getError(), 'TYPE' => 'alert alert-danger');
}
}
}