Centralize where we inject email tags

This commit is contained in:
David Bomba 2022-08-07 17:34:23 +10:00
parent 66c4a1c271
commit 3db1210a12
3 changed files with 13 additions and 13 deletions

View File

@ -100,7 +100,7 @@ class NinjaMailerJob implements ShouldQueue
$this->nmo->mailable->replyTo($this->company->owner()->email, $this->company->owner()->present()->name()); $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 //send email
try { try {

View File

@ -115,12 +115,12 @@ class TemplateEmail extends Mailable
'company' => $company, 'company' => $company,
'whitelabel' => $this->client->user->account->isPaid() ? true : false, 'whitelabel' => $this->client->user->account->isPaid() ? true : false,
'logo' => $this->company->present()->logo($settings), 'logo' => $this->company->present()->logo($settings),
]) ]);
->withSymfonyMessage(function ($message) use ($company) { // ->withSymfonyMessage(function ($message) use ($company) {
$message->getHeaders()->addTextHeader('Tag', $company->company_key); // $message->getHeaders()->addTextHeader('Tag', $company->company_key);
$message->invitation = $this->invitation; // $message->invitation = $this->invitation;
}) //});
->tag($company->company_key); // ->tag($company->company_key);
/*In the hosted platform we need to slow things down a little for Storage to catch up.*/ /*In the hosted platform we need to slow things down a little for Storage to catch up.*/

View File

@ -109,12 +109,12 @@ class VendorTemplateEmail extends Mailable
'company' => $this->company, 'company' => $this->company,
'whitelabel' => $this->vendor->user->account->isPaid() ? true : false, 'whitelabel' => $this->vendor->user->account->isPaid() ? true : false,
'logo' => $this->company->present()->logo($settings), 'logo' => $this->company->present()->logo($settings),
]) ]);
->withSymfonyMessage(function ($message) { //->withSymfonyMessage(function ($message) {
$message->getHeaders()->addTextHeader('Tag', $this->company->company_key); // $message->getHeaders()->addTextHeader('Tag', $this->company->company_key);
$message->invitation = $this->invitation; // $message->invitation = $this->invitation;
}) //});
->tag($this->company->company_key); // ->tag($this->company->company_key);
if(Ninja::isHosted() && $this->invitation){ if(Ninja::isHosted() && $this->invitation){