queue = 'netmail'; } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ public function via($notifiable) { return [ self::via ]; } /** * Get the mail representation of the notification. * * @param mixed $notifiable * @return Netmail * @throws \Exception */ abstract public function toNetmail(object $notifiable): Netmail; protected function setupNetmail(object $notifiable): Netmail { $ao = $notifiable->routeNotificationFor(static::via); $o = new Netmail; $o->to = $ao->system->sysop; $o->from = Setup::PRODUCT_NAME; $o->datetime = Carbon::now(); $o->tzoffset = $o->datetime->utcOffset(); $o->fftn_id = our_address($ao->zone->domain,$ao)->id; $o->tftn_id = $ao->id; $o->flags = (Message::FLAG_LOCAL|Message::FLAG_PRIVATE); $o->cost = 0; $o->tearline = sprintf('%s (%04X)',Setup::PRODUCT_NAME,Setup::PRODUCT_ID); return $o; } }