Run mailer syncronously

This commit is contained in:
David Bomba 2023-02-22 09:45:57 +11:00
parent e3e535e5b7
commit 167f71c883

View File

@ -99,7 +99,7 @@ class EmailRefundPayment 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)));
} }