Laravel 5 – How Do You Catch an Mail::send() Error?
Using the root namespace \Exception did the trick. Instead of: catch(Exception $e){ // Never reached } I used: catch(\Exception $e){ // Get error here }
Using the root namespace \Exception did the trick. Instead of: catch(Exception $e){ // Never reached } I used: catch(\Exception $e){ // Get error here }
Although it is not in the documentation, as of Laravel 5.3.7, the Notifications mail channel can work with Mailable objects in addition to the notification MailMessage objects. Therefore, you can create all your emails as Mailable objects, and if you decide to send them via Notifications, you would just have your toMail() method return the … Read more