From cceadda985fb45432ca11882c3c3ffe6df54f0d7 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sat, 22 Apr 2023 15:18:53 +1000 Subject: [PATCH] Adjustments for email override --- app/Jobs/Mail/NinjaMailerJob.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/Jobs/Mail/NinjaMailerJob.php b/app/Jobs/Mail/NinjaMailerJob.php index 2a1e4d2b63c8..eaab72bf4288 100644 --- a/app/Jobs/Mail/NinjaMailerJob.php +++ b/app/Jobs/Mail/NinjaMailerJob.php @@ -486,8 +486,13 @@ class NinjaMailerJob implements ShouldQueue */ private function preFlightChecksFail(): bool { + /* Always send regardless */ + if($this->override) { + return false; + } + /* If we are migrating data we don't want to fire any emails */ - if ($this->company->is_disabled && !$this->override) { + if ($this->company->is_disabled) { return true; }