This commit is contained in:
Andras Bacsai
2023-06-12 12:52:58 +02:00
parent 19a83bb2c0
commit d80b0f77c5
3 changed files with 9 additions and 3 deletions

View File

@@ -11,11 +11,15 @@ class EmailChannel
public function send(SendsEmail $notifiable, Notification $notification): void
{
$this->bootConfigs($notifiable);
$is_test_notification = $notification instanceof \App\Notifications\TestNotification;
if ($is_test_notification) {
$bcc = $notifiable->routeNotificationForEmail('smtp_test_recipients');
if (count($bcc) === 0) {
if ($notifiable instanceof \App\Models\Team) {
$bcc = $notifiable->members()->pluck('email')->toArray();
}
}
} else {
$bcc = $notifiable->routeNotificationForEmail();
}