From 167f71c883cfc5f5681efec380241f20aefd1706 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 22 Feb 2023 09:45:57 +1100 Subject: [PATCH] Run mailer syncronously --- app/Jobs/Payment/EmailRefundPayment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Jobs/Payment/EmailRefundPayment.php b/app/Jobs/Payment/EmailRefundPayment.php index a3ef64cdbb41..ef79ac773b0d 100644 --- a/app/Jobs/Payment/EmailRefundPayment.php +++ b/app/Jobs/Payment/EmailRefundPayment.php @@ -99,7 +99,7 @@ class EmailRefundPayment 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))); }