queue = 'echomail'; } /** * 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 Echomail * @throws \Exception */ abstract public function toEchomail(object $notifiable): Echomail; protected function setupEchomail(Echoarea $eo): Echomail { $o = new Echomail; $o->from = Setup::PRODUCT_NAME; $o->echoarea_id = $eo->id; $o->datetime = Carbon::now()->utc(); $o->tzoffset = Carbon::now()->utcOffset(); $o->flags = (Message::FLAG_LOCAL); $o->set_tearline = sprintf('%s (%04X)',Setup::PRODUCT_NAME,Setup::PRODUCT_ID); return $o; } protected function sourceSummary(Echomail|Netmail $o,string $item=NULL): string { return sprintf("Your %s was received here on [%s] and it looks like you sent it on [%s].", $item ?: sprintf('%s with ID [%s] to [%s]',$o instanceof Netmail ? 'Netmail' : 'Echomail',$o->msgid,$o->to), Carbon::now()->utc()->toDateTimeString(), $o->date->utc()->toDateTimeString(), ); } }