invalidpass = $invalidpass; $this->packet = $packet; } /** * Get the mail representation of the notification. * * @param mixed $notifiable * @throws \Exception */ public function toNetmail(object $notifiable): Netmail { $o = $this->setupNetmail($notifiable); $ao = $notifiable->routeNotificationFor(static::via); Log::info(sprintf('%s:+ Creating netmail to [%s] - system using invalid packet password',self::LOGKEY,$ao->ftn)); $o->subject = $this->invalidpass.':Incorrect Packet Password'; $o->flags = (Message::FLAG_LOCAL|Message::FLAG_PRIVATE|Message::FLAG_PKTPASSWD|Message::FLAG_CRASH); // Message $msg = $this->page(FALSE,'badpass'); if ($this->invalidpass) $msg->addText( sprintf("Hi there,\r\r". "You sent me a mail packet (%s) with the incorrect password \"%s\". It wasnt processed.\r\r" ,$this->packet,$this->invalidpass)); else $msg->addText( sprintf("Hi there,\r\r". "You sent me a mail packet (%s) with no password? It wasnt processed.\r\r" ,$this->packet)); $msg->addText("Head over to the website if you dont know what your packet password should be :)\r"); $o->msg = $msg->render(); $o->tagline = 'Safety first, password second.'; $o->save(); return $o; } /** * Get the array representation of the notification. * * @return array */ public function toArray(object $notifiable): array { return [ // ]; } }