Laravel 5 - How Do You Catch an Mail::send() Error?

后端 未结 1 1827
不思量自难忘°
不思量自难忘° 2021-01-07 16:30

I have the following method which sends out an e-mail:

Mail::send(\'emails.configuration_test\', array(), function($email)use($request){
    $email->to($r         


        
相关标签:
1条回答
  • 2021-01-07 17:17

    Using the root namespace \Exception did the trick.

    Instead of:

    catch(Exception $e){
        // Never reached
    }
    

    I used:

    catch(\Exception $e){
        // Get error here
    }
    
    0 讨论(0)
提交回复
热议问题