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