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