{"record":{"id":"e251f8f840f51572","repo":"coollabsio/coolify","slug":"no-email-recipients-found","errorCode":null,"errorMessage":"No email recipients found","messagePattern":"No email recipients found","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"warning","filePath":"app/Notifications/Channels/EmailChannel.php","lineNumber":43,"sourceCode":"\n            if ($useInstanceEmailSettings || $isTransactionalEmail) {\n                $settings = instanceSettings();\n            } else {\n                $settings = $notifiable->emailNotificationSettings;\n            }\n\n            $isResendEnabled = $settings->resend_enabled;\n            $isSmtpEnabled = $settings->smtp_enabled;\n\n            if ($customEmails) {\n                $recipients = [$customEmails];\n            } else {\n                $recipients = $notifiable->getRecipients();\n            }\n\n            // Validate team membership for all recipients\n            if (count($recipients) === 0) {\n                throw new Exception('No email recipients found');\n            }\n\n            // Skip team membership validation for test notifications\n            $isTestNotification = data_get($notification, 'isTestNotification', false);\n\n            if (! $isTestNotification) {\n                foreach ($recipients as $recipient) {\n                    // Check if the recipient is part of the team\n                    if (! $members->contains('email', $recipient)) {\n                        $emailSettings = $notifiable->emailNotificationSettings;\n                        data_set($emailSettings, 'smtp_password', '********');\n                        data_set($emailSettings, 'resend_api_key', '********');\n                        send_internal_notification(sprintf(\n                            \"Recipient is not part of the team: %s\\nTeam: %s\\nNotification: %s\\nNotifiable: %s\\nEmail Settings:\\n%s\",\n                            $recipient,\n                            $team,\n                            get_class($notification),\n                            get_class($notifiable),","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/coollabsio/coolify/blob/70b9acc42467278373e00de77abb40684e25b395/app/Notifications/Channels/EmailChannel.php#L25-L61","documentation":"EmailChannel::send() resolves recipients as the notification's custom emails (if provided) or the notifiable team's getRecipients(); when the resulting array is empty it throws before attempting delivery. In practice: custom recipients unset AND no team member currently has email notifications enabled for that event, so there is nowhere to send.","triggerScenarios":"Team notification fires while every member has email disabled in their notification preferences; custom email recipients field left blank; test/notification settings saved without ever enabling email for anyone.","commonSituations":"New teams where nobody opted into email; members toggling off email after being spammed; notification enabled server-wide but per-user preferences all off.","solutions":["Have at least one team member enable this notification type by email in their notification settings.","Or set additional recipient email addresses (custom recipients) on the notification configuration so the channel has a target.","If email is not used at all, disable the email channel for that notification instead of leaving it half-configured."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before notify(): ensure the channel has a target\n$recipients = $customEmails ? [$customEmails] : $notifiable->getRecipients();\nif (count($recipients) === 0) {\n    // skip email channel (or disable the notification) instead of throwing\n    return; \n}","typeGuard":null,"tryCatchPattern":"catch (Exception $e) { if ($e->getMessage() === 'No email recipients found') { log a config warning and continue — one broken channel should not fail the whole notification dispatch; } else { throw $e; } }","preventionTips":["During team setup, have each member enable at least one email notification.","Set custom recipient addresses for shared inboxes so delivery never depends on individual preferences.","Audit notification settings when onboarding new teams."],"tags":["email","notifications","recipients","coolify"],"backgroundTag":"notification-recipients-missing","analyzedSha":"70b9acc42467278373e00de77abb40684e25b395","analyzedAt":"2026-08-17T01:41:01.313Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}