catch all errors in msg sending

This commit is contained in:
Audrey Jensen 2023-09-11 19:18:01 +00:00
parent a65e11f3b8
commit 408015cc2a

View File

@ -2,6 +2,7 @@
namespace App\Controller;
use App\Form\AnonymousComplaintType;
use Error;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
@ -48,7 +49,7 @@ class ComplaintController extends AbstractController
$log->debug($mailer->send($email)->toString());
return true;
}
catch (TransportExceptionInterface $e)
catch ( Error $e)
{
return false;
}