argument('ftn')); if (! $no) throw new ModelNotFoundException('Unknown node: '.$this->argument('ftn')); if ($no->system->mailer_type != Setup::O_EMSI) throw new \Exception(sprintf('Node [%s] doesnt support EMSI',$this->argument('ftn'))); if ((! $no->system->mailer_address) || (! $no->system->mailer_port)) throw new \Exception(sprintf('Unable to poll [%s] missing mailer details',$this->argument('ftn'))); $client = SocketClient::create($no->system->mailer_address,$no->system->mailer_port,38400); $o = new EMSI(Setup::findOrFail(config('app.id'))); $o->session(EMSI::SESSION_AUTO,$client,$no); Log::info(sprintf('Connection ended: %s',$client->getAddress()),['m'=>__METHOD__]); } }