catch all errors in msg sending
This commit is contained in:
parent
a65e11f3b8
commit
408015cc2a
@ -2,6 +2,7 @@
|
|||||||
namespace App\Controller;
|
namespace App\Controller;
|
||||||
|
|
||||||
use App\Form\AnonymousComplaintType;
|
use App\Form\AnonymousComplaintType;
|
||||||
|
use Error;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
use Symfony\Component\Routing\Annotation\Route;
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
@ -48,7 +49,7 @@ class ComplaintController extends AbstractController
|
|||||||
$log->debug($mailer->send($email)->toString());
|
$log->debug($mailer->send($email)->toString());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (TransportExceptionInterface $e)
|
catch ( Error $e)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user