1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 14:12:44 +01:00

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->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)));
}