queue = 'netmail'; $this->ao = $ao; $this->uo = $uo; } /** * 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:Sending a link code for address [%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 = 'Address Link Code'; $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 = 'Address Linking...'; $o->tearline = sprintf('%s (%04X)',Setup::PRODUCT_NAME,Setup::PRODUCT_ID); // Message $msg = new Page; $msg->addLogo(new ANSI(base_path('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('#link'); $msg->addLeftBoxContent($lbc); $msg->addText(sprintf( "Hi %s,\r\r". "This message is to link your address [%s] to your user ID in the Clearing Houz web site.\r\r". "If you didnt start this process, then you can safely ignore this netmail. But if you wanted to link this address, please head over to [%s] and paste in the following:\r\r%s\r", $this->ao->system->sysop, $this->ao->ftn3d, url('/link'), $this->ao->set_activation($this->uo) )); $o->msg = $msg->render(); $o->save(); return $o; } }