Fixed Swiftmailer not catching Exceptions
This commit is contained in:
parent
bbb0a7ec80
commit
34de0421d8
|
@ -137,14 +137,14 @@ class ApiControllerProvider implements ControllerProviderInterface {
|
|||
$contactFormName = $contactFormData['contact']['name'];
|
||||
$contactFormEmail = $contactFormData['contact']['email'];
|
||||
$contactFormMessage = $contactFormData['contact']['message'];
|
||||
|
||||
$message = $contactFormMessage . "\n\nEmail : " . $contactFormName . '<' . $contactFormEmail . '>';
|
||||
$failures = '';
|
||||
|
||||
$sent = $app['mailer']->send(\Swift_Message::newInstance()
|
||||
->setSubject('[Resume] Message')
|
||||
->setFrom(['no-reply@rewiv.com' => $contactFormName])
|
||||
->setTo($app->config('app.email'))
|
||||
->setBody($contactFormMessage)
|
||||
->setBody($message)
|
||||
, $failures);
|
||||
if($sent > 0) {
|
||||
$request->getSession()->remove('_csrf/contact');
|
||||
|
|
Loading…
Reference in New Issue