Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

Add error handling for missing email settings in EmailChannel.php

Andras Bacsai45fa88ca4dbc
diff --git a/app/Notifications/Channels/EmailChannel.php b/app/Notifications/Channels/EmailChannel.php
index 82fc9a65ce..99afcf5a77 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)) {