moon mailer stuff

This commit is contained in:
2019-08-01 22:20:48 -05:00
parent 9192ffa63f
commit b09f48ccdc
2 changed files with 125 additions and 5 deletions
+5 -5
View File
@@ -73,14 +73,14 @@ class SendEveMailJob implements ShouldQueue
$config = config('esi');
//Retrieve the token for main character to send mails from
$token = EsiToken::where(['character_id'=> $config['primary']])->get();
$token = EsiToken::where(['character_id'=> 92626011])->first();
//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,
'refresh_token' => $token->refresh_token,
]);
//Setup the Eseye class
@@ -89,15 +89,15 @@ class SendEveMailJob implements ShouldQueue
//Attemp to send the mail
try {
$esi->setBody([
'approved_cost' => 0,
'approved_cost' => 100,
'body' => $this->body,
'recipients' => [[
'recipient_id' => (int)$this->recipient,
'recipient_id' => 92626011,
'recipient_type' => $this->recipient_type,
]],
'subject' => $this->subject,
])->invoke('post', '/characters/{character_id}/mail/', [
'character_id'=> $config['primary'],
'character_id'=> 92626011,
]);
} catch(RequestFailedException $e) {
Log::warning($e);