Run mailer syncronously

This commit is contained in:
David Bomba 2023-02-22 09:29:29 +11:00
parent 3d8fee2d5d
commit c6c0bb4d4b

View File

@ -90,7 +90,7 @@ class EmailPayment implements ShouldQueue
$nmo->company = $this->company; $nmo->company = $this->company;
$nmo->entity = $this->payment; $nmo->entity = $this->payment;
NinjaMailerJob::dispatch($nmo); (new NinjaMailerJob($nmo))->handle();
event(new PaymentWasEmailed($this->payment, $this->payment->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null))); event(new PaymentWasEmailed($this->payment, $this->payment->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null)));
} }