From 45fa88ca4dbc346b3be19716f0b12ebbce2f103a Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 14 Nov 2023 11:04:45 +0100 Subject: [PATCH] Add error handling for missing email settings in EmailChannel.php --- app/Notifications/Channels/EmailChannel.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Notifications/Channels/EmailChannel.php b/app/Notifications/Channels/EmailChannel.php index 82fc9a65c..99afcf5a7 100644 --- a/app/Notifications/Channels/EmailChannel.php +++ b/app/Notifications/Channels/EmailChannel.php @@ -29,6 +29,10 @@ class EmailChannel ->html((string)$mailMessage->render()) ); } catch (Exception $e) { + $error = $e->getMessage(); + if ($error === 'No email settings found.') { + throw $e; + } ray($e->getMessage()); $message = "EmailChannel error: {$e->getMessage()}. Failed to send email to:"; if (isset($recepients)) {