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.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
Fix: Allow test emails to be sent to any email address
Andras Bacsai546256b22cca
diff --git a/app/Notifications/Channels/EmailChannel.php b/app/Notifications/Channels/EmailChannel.phpindex 234bc37ada..abd1155502 100644--- a/app/Notifications/Channels/EmailChannel.php+++ b/app/Notifications/Channels/EmailChannel.php@@ -43,21 +43,26 @@ class EmailChannelthrow new Exception('No email recipients found');}- foreach ($recipients as $recipient) {- // Check if the recipient is part of the team- if (! $members->contains('email', $recipient)) {- $emailSettings = $notifiable->emailNotificationSettings;- data_set($emailSettings, 'smtp_password', '********');- data_set($emailSettings, 'resend_api_key', '********');- send_internal_notification(sprintf(- "Recipient is not part of the team: %s\nTeam: %s\nNotification: %s\nNotifiable: %s\nEmail Settings:\n%s",- $recipient,- $team,- get_class($notification),- get_class($notifiable),- json_encode($emailSettings, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)- ));- throw new Exception('Recipient is not part of the team');+ // Skip team membership validation for test notifications+ $isTestNotification = data_get($notification, 'isTestNotification', false);++ if (! $isTestNotification) {+ foreach ($recipients as $recipient) {+ // Check if the recipient is part of the team+ if (! $members->contains('email', $recipient)) {+ $emailSettings = $notifiable->emailNotificationSettings;+ data_set($emailSettings, 'smtp_password', '********');+ data_set($emailSettings, 'resend_api_key', '********');+ send_internal_notification(sprintf(+ "Recipient is not part of the team: %s\nTeam: %s\nNotification: %s\nNotifiable: %s\nEmail Settings:\n%s",+ $recipient,+ $team,+ get_class($notification),+ get_class($notifiable),+ json_encode($emailSettings, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)+ ));+ throw new Exception('Recipient is not part of the team');+ }}}diff --git a/app/Notifications/Test.php b/app/Notifications/Test.phpindex 60bc8a0ee5..bbed22777c 100644--- a/app/Notifications/Test.php+++ b/app/Notifications/Test.php@@ -23,6 +23,8 @@ class Test extends Notification implements ShouldQueuepublic $tries = 5;+ public bool $isTestNotification = true;+public function __construct(public ?string $emails = null, public ?string $channel = null, public ?bool $ping = false){$this->onQueue('high');diff --git a/app/Notifications/TransactionalEmails/Test.php b/app/Notifications/TransactionalEmails/Test.phpindex 3add70db2b..2f7d70bbf0 100644--- a/app/Notifications/TransactionalEmails/Test.php+++ b/app/Notifications/TransactionalEmails/Test.php@@ -8,6 +8,8 @@ use Illuminate\Notifications\Messages\MailMessage;class Test extends CustomEmailNotification{+ public bool $isTestNotification = true;+public function __construct(public string $emails, public bool $isTransactionalEmail = true){$this->onQueue('high');