Debug v20 - Fix use of oauth for alternative send email setup
This commit is contained in:
parent
2068f29b44
commit
2efb14c767
1 changed files with 7 additions and 7 deletions
|
|
@ -208,7 +208,7 @@ class CMailFile
|
|||
|
||||
$this->sendcontext = $sendcontext;
|
||||
|
||||
// Define this->sendmode ('mail', 'smtps', 'swiftmailer', ...) according to $sendcontext ('standard', 'emailing', 'ticket', 'password')
|
||||
// Define this->sendmode ('mail', 'smtps', 'swiftmailer', ...) according to $sendcontext ('standard', 'emailing', 'ticket', 'passwordreset')
|
||||
$this->sendmode = '';
|
||||
if (!empty($this->sendcontext)) {
|
||||
$smtpContextKey = strtoupper($this->sendcontext);
|
||||
|
|
@ -1092,9 +1092,9 @@ class CMailFile
|
|||
// Token expired so we refresh it
|
||||
if (is_object($tokenobj) && $expire) {
|
||||
$credentials = new Credentials(
|
||||
getDolGlobalString('OAUTH_'.getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE').'_ID'),
|
||||
getDolGlobalString('OAUTH_'.getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE').'_SECRET'),
|
||||
getDolGlobalString('OAUTH_'.getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE').'_URLAUTHORIZE')
|
||||
getDolGlobalString('OAUTH_'.getDolGlobalString($keyforsmtpoauthservice).'_ID'),
|
||||
getDolGlobalString('OAUTH_'.getDolGlobalString($keyforsmtpoauthservice).'_SECRET'),
|
||||
getDolGlobalString('OAUTH_'.getDolGlobalString($keyforsmtpoauthservice).'_URLAUTHORIZE')
|
||||
);
|
||||
$serviceFactory = new \OAuth\ServiceFactory();
|
||||
$oauthname = explode('-', $OAUTH_SERVICENAME);
|
||||
|
|
@ -1249,9 +1249,9 @@ class CMailFile
|
|||
// Token expired so we refresh it
|
||||
if (is_object($tokenobj) && $expire) {
|
||||
$credentials = new Credentials(
|
||||
getDolGlobalString('OAUTH_'.getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE').'_ID'),
|
||||
getDolGlobalString('OAUTH_'.getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE').'_SECRET'),
|
||||
getDolGlobalString('OAUTH_'.getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE').'_URLAUTHORIZE')
|
||||
getDolGlobalString('OAUTH_'.getDolGlobalString($keyforsmtpoauthservice).'_ID'),
|
||||
getDolGlobalString('OAUTH_'.getDolGlobalString($keyforsmtpoauthservice).'_SECRET'),
|
||||
getDolGlobalString('OAUTH_'.getDolGlobalString($keyforsmtpoauthservice).'_URLAUTHORIZE')
|
||||
);
|
||||
$serviceFactory = new \OAuth\ServiceFactory();
|
||||
$oauthname = explode('-', $OAUTH_SERVICENAME);
|
||||
|
|
|
|||
Loading…
Reference in a new issue