mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge pull request #4917 from turbo124/v5-develop
Wire up settings in mailer job
This commit is contained in:
commit
648e6b3252
@ -47,14 +47,11 @@ class NinjaMailerJob implements ShouldQueue
|
|||||||
|
|
||||||
public $nmo;
|
public $nmo;
|
||||||
|
|
||||||
public $settings;
|
|
||||||
|
|
||||||
public function __construct(NinjaMailerObject $nmo)
|
public function __construct(NinjaMailerObject $nmo)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->nmo = $nmo;
|
$this->nmo = $nmo;
|
||||||
|
|
||||||
$this->settings = $nmo->settings;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function handle()
|
public function handle()
|
||||||
@ -104,7 +101,7 @@ class NinjaMailerJob implements ShouldQueue
|
|||||||
|
|
||||||
private function setGmailMailer()
|
private function setGmailMailer()
|
||||||
{
|
{
|
||||||
$sending_user = $this->settings->gmail_sending_user_id;
|
$sending_user = $this->nmo->settings->gmail_sending_user_id;
|
||||||
|
|
||||||
$user = User::find($this->decodePrimaryKey($sending_user));
|
$user = User::find($this->decodePrimaryKey($sending_user));
|
||||||
|
|
||||||
@ -143,7 +140,7 @@ class NinjaMailerJob implements ShouldQueue
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function failed($exception = null)
|
public function failed($exception = null)
|
||||||
{
|
{
|
||||||
nlog('mailer job failed');
|
nlog('mailer job failed');
|
||||||
nlog($exception->getMessage());
|
nlog($exception->getMessage());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user