mail exception unable to manage try catch
How do I handle invalid domain error?
I tried to insert the mail function inside a try catch construct, but the exception is not handled and show the error in img
thnks
9 Replies
Did you actually import the exception class?
Also... did you restart the queue if using a queue
no man not imported
Do it and try again.
ok thanks its works
Do you understand why?
Fairly sure \ on the Exception should suffice too.
Solution
yes I use
and ADD use Symfony\Component\Mailer\Exception\UnexpectedResponseException;