token was not refreshing

This commit is contained in:
Frédéric FRANCE 2022-08-11 10:53:15 +02:00
parent b748665296
commit d7bccaa70c

View File

@ -993,9 +993,9 @@ class CMailFile
// Token expired so we refresh it // Token expired so we refresh it
if (is_object($tokenobj) && $expire) { if (is_object($tokenobj) && $expire) {
$credentials = new Credentials( $credentials = new Credentials(
getDolGlobalString('OAUTH_'.$conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE.'_ID'), getDolGlobalString('OAUTH_'.getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE').'_ID'),
getDolGlobalString('OAUTH_'.$conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE.'_SECRET'), getDolGlobalString('OAUTH_'.getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE').'_SECRET'),
getDolGlobalString('OAUTH_'.$conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE.'_URLAUTHORIZE') getDolGlobalString('OAUTH_'.getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE').'_URLAUTHORIZE')
); );
$serviceFactory = new \OAuth\ServiceFactory(); $serviceFactory = new \OAuth\ServiceFactory();
$oauthname = explode('-', $OAUTH_SERVICENAME); $oauthname = explode('-', $OAUTH_SERVICENAME);