I have the following method that sends an email:
Mail::send('emails.configuration_test', array(), function($email)use($request){ $email->to($request->test_address)->subject('Configuration Test'); });
If the above errors are missing, I would like to catch an exception. When I use the following:
try{ Mail::send('emails.configuration_test', array(), function($email)use($request){ $email->to($request->test_address)->subject('Configuration Test'); }); } catch(Exception $e){
exception never gets caught. Instead, I get a stack of Laravel as an answer if send() errors are missing.
How can I catch the exception in this case?
source share