mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for gmail notifications when credentials expire
This commit is contained in:
parent
be89ac9362
commit
8a0fded7ca
@ -226,10 +226,10 @@ class NinjaMailerJob implements ShouldQueue
|
|||||||
|
|
||||||
if(!$user->oauth_user_token) {
|
if(!$user->oauth_user_token) {
|
||||||
$this->company->account->gmailCredentialNotification();
|
$this->company->account->gmailCredentialNotification();
|
||||||
return;
|
$this->nmo->settings->email_sending_method = 'default';
|
||||||
|
return $this->setMailDriver();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Now that our token is refreshed and valid we can boot the
|
* Now that our token is refreshed and valid we can boot the
|
||||||
* mail driver at runtime and also set the token which will persist
|
* mail driver at runtime and also set the token which will persist
|
||||||
@ -238,6 +238,12 @@ class NinjaMailerJob implements ShouldQueue
|
|||||||
|
|
||||||
$token = $user->oauth_user_token->access_token;
|
$token = $user->oauth_user_token->access_token;
|
||||||
|
|
||||||
|
if(!$token) {
|
||||||
|
$this->company->account->gmailCredentialNotification();
|
||||||
|
$this->nmo->settings->email_sending_method = 'default';
|
||||||
|
return $this->setMailDriver();
|
||||||
|
}
|
||||||
|
|
||||||
$this->nmo
|
$this->nmo
|
||||||
->mailable
|
->mailable
|
||||||
->from($user->email, $user->name())
|
->from($user->email, $user->name())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user