where('character_id', 93738489)->get(); $configuration = Configuration::getInstance(); $configuration->cache = NullCache::class; //Create the ESI authentication container $config = config('esi'); $authentication = new EsiAuthentication([ 'client_id' => $config['client_id'], 'secret' => $config['secret'], 'refresh_token' => $token[0]->refresh_token, ]); //Create the esi class variable $esi = new Eseye($authentication); try { $esi->setBody([ 'body' => $body, 'receipients' => [ 'recipient_id'=> $charId, 'recipient_type' => 'character', ], 'subject' => $subject, ])->invoke('post', '/characters/{character_id}/mail/', [ 'character_id' => 93738489, ]); } catch(\Seat\Eseye\Exceptions\RequestFailedException $e) { return $e->getEsiResponse(); } } } ?>