From d1bdf4cc9773c75129e71f56a03f1fea3f6da7af Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 31 Aug 2022 14:30:23 +1000 Subject: [PATCH] Minor fixes for templates --- app/Jobs/Mail/NinjaMailerJob.php | 11 ++++++++--- app/Mail/Engine/PaymentEmailEngine.php | 1 + resources/views/email/template/admin.blade.php | 2 +- resources/views/email/template/client.blade.php | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/Jobs/Mail/NinjaMailerJob.php b/app/Jobs/Mail/NinjaMailerJob.php index 928a75f36e06..b6895b3db4a8 100644 --- a/app/Jobs/Mail/NinjaMailerJob.php +++ b/app/Jobs/Mail/NinjaMailerJob.php @@ -354,10 +354,15 @@ class NinjaMailerJob implements ShouldQueue if(!str_contains($this->nmo->to_user->email, "@")) return true; - /* On the hosted platform if the user has not verified their account we fail here */ - if(Ninja::isHosted() && $this->company->account && !$this->company->account->account_sms_verified) + /* On the hosted platform if the user has not verified their account we fail here - but still check what they are trying to send! */ + if(Ninja::isHosted() && $this->company->account && !$this->company->account->account_sms_verified){ + + if(class_exists(\Modules\Admin\Jobs\Account\EmailQuality::class)) + return (new \Modules\Admin\Jobs\Account\EmailQuality($this->nmo, $this->company))->run(); + return true; - + } + /* On the hosted platform we actively scan all outbound emails to ensure outbound email quality remains high */ if(class_exists(\Modules\Admin\Jobs\Account\EmailQuality::class)) return (new \Modules\Admin\Jobs\Account\EmailQuality($this->nmo, $this->company))->run(); diff --git a/app/Mail/Engine/PaymentEmailEngine.php b/app/Mail/Engine/PaymentEmailEngine.php index 4395b662472e..95c3e15c1cc9 100644 --- a/app/Mail/Engine/PaymentEmailEngine.php +++ b/app/Mail/Engine/PaymentEmailEngine.php @@ -222,6 +222,7 @@ class PaymentEmailEngine extends BaseEmailEngine $data['$view_link'] = ['value' => ''.ctrans('texts.view_payment').'', 'label' => ctrans('texts.view_payment')]; $data['$view_button'] = &$data['$view_link']; + $data['$viewButton'] = &$data['$view_link']; $data['$viewLink'] = &$data['$view_link']; $data['$paymentLink'] = &$data['$view_link']; $data['$portalButton'] = ['value' => "".ctrans('texts.login').'', 'label' =>'']; diff --git a/resources/views/email/template/admin.blade.php b/resources/views/email/template/admin.blade.php index 86e7cde9ed47..82b9df9e55a5 100644 --- a/resources/views/email/template/admin.blade.php +++ b/resources/views/email/template/admin.blade.php @@ -125,7 +125,7 @@
- + diff --git a/resources/views/email/template/client.blade.php b/resources/views/email/template/client.blade.php index eb79157f48aa..b8b5a173352d 100644 --- a/resources/views/email/template/client.blade.php +++ b/resources/views/email/template/client.blade.php @@ -111,7 +111,7 @@
- +