*/ public function via(object $notifiable): array { return ['mail']; } /** * Get the mail representation of the notification. */ public function toMail(object $notifiable): MailMessage { Log::info(sprintf('%s:+ Sending a NODE MARKED DOWN EMAIL for address [%s]',self::LOGKEY,$this->ao->ftn)); $now = Carbon::now(); return (new MailMessage) ->cc(our_address($this->ao)->system->users->first()->email) ->subject(sprintf('ACTION REQUIRED: Your system will be delisted on %s',$now->format('Y-m-d'))) ->line(sprintf('Your system has been marked **DOWN**, because it hasnt polled **%s** since **%s** (%d days).',$this->ao->zone->domain->name,$this->ao->system->last_session->format('Y-m-d'),$this->ao->system->last_session->diffInDays($now))) ->line('') ->line('You have (waiting for collection):') ->lineIf($this->ao->uncollected_netmail,sprintf('* %s Netmails',number_format($this->ao->uncollected_netmail))) ->lineIf($this->ao->uncollected_echomail,sprintf('* %s Echomails',number_format($this->ao->uncollected_echomail))) ->lineIf($this->ao->uncollected_files,sprintf('* %s Files',number_format($this->ao->uncollected_files))) ->line('') ->line(sprintf('Your system will automatically be **DE-LISTED** if your system hasnt polled to collected your mail/file(s) by **%s**',$now->addDays(7)->format('Y-m-d'))) ->line('If you think you\'ve received this email by mistake or need help, please let me know.'); } }