mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 13:54:30 -04:00
Fixes for mailers
This commit is contained in:
parent
87d14dd052
commit
85b5398718
@ -51,7 +51,7 @@ class NinjaMailerJob implements ShouldQueue
|
|||||||
|
|
||||||
public $override;
|
public $override;
|
||||||
|
|
||||||
/** @var \App\Models\Company $company | null **/
|
/** @var null|\App\Models\Company $company **/
|
||||||
public ?Company $company;
|
public ?Company $company;
|
||||||
|
|
||||||
private $mailer;
|
private $mailer;
|
||||||
@ -143,8 +143,6 @@ class NinjaMailerJob implements ShouldQueue
|
|||||||
LightLogs::create(new EmailSuccess($this->nmo->company->company_key))
|
LightLogs::create(new EmailSuccess($this->nmo->company->company_key))
|
||||||
->send();
|
->send();
|
||||||
|
|
||||||
$this->nmo = null;
|
|
||||||
$this->company = null;
|
|
||||||
} catch(\Symfony\Component\Mime\Exception\RfcComplianceException $e) {
|
} catch(\Symfony\Component\Mime\Exception\RfcComplianceException $e) {
|
||||||
nlog("Mailer failed with a Logic Exception {$e->getMessage()}");
|
nlog("Mailer failed with a Logic Exception {$e->getMessage()}");
|
||||||
$this->fail();
|
$this->fail();
|
||||||
@ -195,6 +193,9 @@ class NinjaMailerJob implements ShouldQueue
|
|||||||
$this->release($this->backoff()[$this->attempts()-1]);
|
$this->release($this->backoff()[$this->attempts()-1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->nmo = null;
|
||||||
|
$this->company = null;
|
||||||
|
|
||||||
/*Clean up mailers*/
|
/*Clean up mailers*/
|
||||||
$this->cleanUpMailers();
|
$this->cleanUpMailers();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user