From 3db1210a12f9734be883323d98fc2fadb3d36b51 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 7 Aug 2022 17:34:23 +1000 Subject: [PATCH] Centralize where we inject email tags --- app/Jobs/Mail/NinjaMailerJob.php | 2 +- app/Mail/TemplateEmail.php | 12 ++++++------ app/Mail/VendorTemplateEmail.php | 12 ++++++------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/Jobs/Mail/NinjaMailerJob.php b/app/Jobs/Mail/NinjaMailerJob.php index 23234de47d..598156ce71 100644 --- a/app/Jobs/Mail/NinjaMailerJob.php +++ b/app/Jobs/Mail/NinjaMailerJob.php @@ -100,7 +100,7 @@ class NinjaMailerJob implements ShouldQueue $this->nmo->mailable->replyTo($this->company->owner()->email, $this->company->owner()->present()->name()); } - // $this->nmo->mailable->tag($this->company->company_key); + $this->nmo->mailable->tag($this->company->company_key); //send email try { diff --git a/app/Mail/TemplateEmail.php b/app/Mail/TemplateEmail.php index 941cbc8a96..d4b840c547 100644 --- a/app/Mail/TemplateEmail.php +++ b/app/Mail/TemplateEmail.php @@ -115,12 +115,12 @@ class TemplateEmail extends Mailable 'company' => $company, 'whitelabel' => $this->client->user->account->isPaid() ? true : false, 'logo' => $this->company->present()->logo($settings), - ]) - ->withSymfonyMessage(function ($message) use ($company) { - $message->getHeaders()->addTextHeader('Tag', $company->company_key); - $message->invitation = $this->invitation; - }) - ->tag($company->company_key); + ]); + // ->withSymfonyMessage(function ($message) use ($company) { + // $message->getHeaders()->addTextHeader('Tag', $company->company_key); + // $message->invitation = $this->invitation; + //}); + // ->tag($company->company_key); /*In the hosted platform we need to slow things down a little for Storage to catch up.*/ diff --git a/app/Mail/VendorTemplateEmail.php b/app/Mail/VendorTemplateEmail.php index 94ff131937..2211a0adcc 100644 --- a/app/Mail/VendorTemplateEmail.php +++ b/app/Mail/VendorTemplateEmail.php @@ -109,12 +109,12 @@ class VendorTemplateEmail extends Mailable 'company' => $this->company, 'whitelabel' => $this->vendor->user->account->isPaid() ? true : false, 'logo' => $this->company->present()->logo($settings), - ]) - ->withSymfonyMessage(function ($message) { - $message->getHeaders()->addTextHeader('Tag', $this->company->company_key); - $message->invitation = $this->invitation; - }) - ->tag($this->company->company_key); + ]); + //->withSymfonyMessage(function ($message) { + // $message->getHeaders()->addTextHeader('Tag', $this->company->company_key); + // $message->invitation = $this->invitation; + //}); + // ->tag($this->company->company_key); if(Ninja::isHosted() && $this->invitation){