F
Filament6mo ago
Zoltar

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
No description
Solution:
yes I use
No description
Jump to solution
9 Replies
Dennis Koch
Dennis Koch6mo ago
Did you actually import the exception class?
toeknee
toeknee6mo ago
Also... did you restart the queue if using a queue
Zoltar
ZoltarOP6mo ago
no man not imported
Dennis Koch
Dennis Koch6mo ago
Do it and try again.
Zoltar
ZoltarOP6mo ago
ok thanks its works
Dennis Koch
Dennis Koch6mo ago
Do you understand why?
toeknee
toeknee6mo ago
Fairly sure \ on the Exception should suffice too.
Solution
Zoltar
Zoltar6mo ago
yes I use
No description
Zoltar
ZoltarOP6mo ago
and ADD use Symfony\Component\Mailer\Exception\UnexpectedResponseException;
Want results from more Discord servers?
Add your server