mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Updates for forcing build() method again
This commit is contained in:
parent
78fd8ee7fa
commit
211abc7076
@ -110,6 +110,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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Run time we set the email tag */
|
/* Run time we set the email tag */
|
||||||
$this->nmo->mailable->tag($this->company->company_key);
|
$this->nmo->mailable->tag($this->company->company_key);
|
||||||
|
|
||||||
@ -137,9 +138,16 @@ class NinjaMailerJob implements ShouldQueue
|
|||||||
$mailer->mailgun_config($this->client_mailgun_secret, $this->client_mailgun_domain, $this->nmo->settings->mailgun_endpoint);
|
$mailer->mailgun_config($this->client_mailgun_secret, $this->client_mailgun_domain, $this->nmo->settings->mailgun_endpoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$mailable = $this->nmo->mailable;
|
||||||
|
|
||||||
|
/** May need to re-build it here */
|
||||||
|
if(Ninja::isHosted() && method_exists($mailable, 'build')) {
|
||||||
|
$mailable->build();
|
||||||
|
}
|
||||||
|
|
||||||
$mailer
|
$mailer
|
||||||
->to($this->nmo->to_user->email)
|
->to($this->nmo->to_user->email)
|
||||||
->send($this->nmo->mailable);
|
->send($mailable);
|
||||||
|
|
||||||
/* Count the amount of emails sent across all the users accounts */
|
/* Count the amount of emails sent across all the users accounts */
|
||||||
Cache::increment("email_quota".$this->company->account->key);
|
Cache::increment("email_quota".$this->company->account->key);
|
||||||
@ -575,7 +583,6 @@ class NinjaMailerJob implements ShouldQueue
|
|||||||
if (class_exists(\Modules\Admin\Jobs\Account\EmailQuality::class)) {
|
if (class_exists(\Modules\Admin\Jobs\Account\EmailQuality::class)) {
|
||||||
(new \Modules\Admin\Jobs\Account\EmailQuality($this->nmo, $this->company))->run();
|
(new \Modules\Admin\Jobs\Account\EmailQuality($this->nmo, $this->company))->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user