N°5102 - Allow to send emails using GSuite SMTP and OAuth - Rework

This commit is contained in:
Eric Espie
2022-06-22 16:37:31 +02:00
parent ba59643f52
commit 9f60f27636
66 changed files with 1513 additions and 1228 deletions

View File

@@ -137,7 +137,7 @@ function CheckEmailSetting($oP)
$sUserName = MetaModel::GetConfig()->Get('email_transport_smtp.username');
$sDisplayUserName = empty($sUserName) ? '<em>no user</em> ' : $sUserName;
try {
$oRemoteAuthentOAuth = OAuthClientProviderFactory::GetRemoteAuthentOAuthForSMTP();
$oRemoteAuthentOAuth = OAuthClientProviderFactory::GetOAuthClientForSMTP();
$sLink = MetaModel::GetHyperLink(get_class($oRemoteAuthentOAuth), $oRemoteAuthentOAuth->GetKey());
$oP->info("The connection used is: $sLink");
$sProvider = $oRemoteAuthentOAuth->Get('provider');