From e266c7cdec3387d2a80e6ac987a7ace64c59a315 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 18 Oct 2023 14:22:09 +0200 Subject: [PATCH] fix: email channel no recepients --- app/Notifications/Channels/EmailChannel.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/Notifications/Channels/EmailChannel.php b/app/Notifications/Channels/EmailChannel.php index 5cd4ceaeb..cd6dc4b56 100644 --- a/app/Notifications/Channels/EmailChannel.php +++ b/app/Notifications/Channels/EmailChannel.php @@ -30,7 +30,12 @@ class EmailChannel ); } catch (Exception $e) { ray($e->getMessage()); - send_internal_notification("EmailChannel error: {$e->getMessage()}. Failed to send email to: " . implode(', ', $recepients) . " with subject: {$mailMessage->subject}"); + $message = "EmailChannel error: {$e->getMessage()}. Failed to send email to:"; + if (isset($recepients)) { + $message .= implode(', ', $recepients); + } + $message .= " with subject: {$mailMessage->subject}"; + send_internal_notification($message); throw $e; } }