Merge pull request #5522 from turbo124/v5-develop

Analytics
This commit is contained in:
David Bomba 2021-04-25 08:18:49 +10:00 committed by GitHub
commit f96ed5d355
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,8 +87,13 @@ class NinjaMailerJob implements ShouldQueue
//send email //send email
try { try {
nlog("trying to send"); nlog("trying to send");
Mail::to($this->nmo->to_user->email) Mail::to($this->nmo->to_user->email)
->send($this->nmo->mailable); ->send($this->nmo->mailable);
LightLogs::create(new EmailSuccess($this->nmo->company_key->company_key))
->batch();
} catch (\Exception $e) { } catch (\Exception $e) {
nlog("error failed with {$e->getMessage()}"); nlog("error failed with {$e->getMessage()}");
@ -181,8 +186,6 @@ class NinjaMailerJob implements ShouldQueue
$message->getHeaders()->addTextHeader('GmailToken', $token); $message->getHeaders()->addTextHeader('GmailToken', $token);
}); });
LightLogs::create(new EmailSuccess($this->nmo->company_key->company_key))
->batch();
} }
private function logMailError($errors, $recipient_object) private function logMailError($errors, $recipient_object)