diff --git a/app/Listeners/SendNotificationMail.php b/app/Listeners/SendNotificationMail.php index 178df4a..fc9531e 100644 --- a/app/Listeners/SendNotificationMail.php +++ b/app/Listeners/SendNotificationMail.php @@ -21,7 +21,7 @@ class SendNotificationMail public function handle(NotifySubscriptions $event) { foreach ($event->ticket->subscriptions as $sub) { - if ($sub->email !== Auth::user()->email) { + if (Auth::user() and $sub->email !== Auth::user()->email) { Mail::to($sub->email)->send(new TicketUpdate($event->ticket, $event->corpsMaj)); } }