queue = 'netmail'; $this->ao = $ao; } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ public function via($notifiable) { return ['netmail']; } /** * Get the mail representation of the notification. * * @param mixed $notifiable * @return Netmail * @throws \Exception */ public function toNetmail($notifiable): Netmail { Log::info(sprintf('%s:Creating test netmail to [%s]',self::LOGKEY,$this->ao->ftn)); $so = Setup::findOrFail(config('app.id'))->system; $o = new Netmail; $o->to = $this->ao->system->sysop; $o->from = Setup::PRODUCT_NAME; $o->subject = 'Testing 1, 2, 3...'; $o->datetime = Carbon::now(); $o->tzoffset = $o->datetime->utcOffset(); $o->fftn_id = $so->match($this->ao->zone)->first()->id; $o->tftn_id = $this->ao->id; $o->flags = Message::FLAG_LOCAL; $o->cost = 0; $o->tagline = 'Testing, testing, 1 2 3.'; $o->tearline = sprintf('%s (%04X)',Setup::PRODUCT_NAME,Setup::PRODUCT_ID); // Message $msg = new Page; $msg->addLogo(new ANSI('public/logo/netmail.bin')); $header = new Thick; $header->addText(ANSI::ansi_code([1,37]).'Clearing Houz'); $msg->addHeader($header,'FTN Mailer and Tosser',TRUE,0xc4); $lbc = new Thin; $lbc->addText('Test'); $msg->addLeftBoxContent($lbc); $msg->addText( "Hi there,\r\r". "This is just a test netmail to make sure we can send a message to your system.\r\r". "There is no need to reply, but if you do, it'll boost my spirits :)\r" ); $o->msg = $msg->render(); $o->save(); return $o; } }