mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 18:19:22 +03:00
Capability improvements
Additional branding options
This commit is contained in:
parent
7fce424758
commit
763fae345b
46 changed files with 880 additions and 556 deletions
|
|
@ -437,8 +437,18 @@ class Account extends \RainLoop\Account // for backward compatibility
|
|||
}
|
||||
else
|
||||
{
|
||||
$oMailClient->Login($aImapCredentials['Login'], $aImapCredentials['Password'], '',
|
||||
$aImapCredentials['UseAuthPlainIfSupported']);
|
||||
$iGatLen = \strlen(APP_GOOGLE_ACCESS_TOKEN_PREFIX);
|
||||
$sPassword = $aImapCredentials['Password'];
|
||||
if (APP_GOOGLE_ACCESS_TOKEN_PREFIX === \substr($sPassword, 0, $iGatLen))
|
||||
{
|
||||
$oMailClient->LoginWithXOauth2(
|
||||
\base64_encode('user='.$aImapCredentials['Login']."\1".'auth=Bearer '.\substr($sPassword, $iGatLen)."\1\1"));
|
||||
}
|
||||
else
|
||||
{
|
||||
$oMailClient->Login($aImapCredentials['Login'], $aImapCredentials['Password'], '',
|
||||
$aImapCredentials['UseAuthPlainIfSupported']);
|
||||
}
|
||||
}
|
||||
|
||||
$bLogin = true;
|
||||
|
|
@ -495,7 +505,17 @@ class Account extends \RainLoop\Account // for backward compatibility
|
|||
|
||||
if ($aSmtpCredentials['UseAuth'] && !$aSmtpCredentials['UsePhpMail'] && $oSmtpClient)
|
||||
{
|
||||
$oSmtpClient->Login($aSmtpCredentials['Login'], $aSmtpCredentials['Password']);
|
||||
$iGatLen = \strlen(APP_GOOGLE_ACCESS_TOKEN_PREFIX);
|
||||
$sPassword = $aSmtpCredentials['Password'];
|
||||
if (APP_GOOGLE_ACCESS_TOKEN_PREFIX === \substr($sPassword, 0, $iGatLen))
|
||||
{
|
||||
$oSmtpClient->LoginWithXOauth2(
|
||||
\base64_encode('user='.$aSmtpCredentials['Login']."\1".'auth=Bearer '.\substr($sPassword, $iGatLen)."\1\1"));
|
||||
}
|
||||
else
|
||||
{
|
||||
$oSmtpClient->Login($aSmtpCredentials['Login'], $aSmtpCredentials['Password']);
|
||||
}
|
||||
|
||||
$bLogin = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue