mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-12-29 02:51:48 +08:00
STARTTLS detection fix
This commit is contained in:
parent
260874d789
commit
48dc9859c2
2 changed files with 8 additions and 2 deletions
|
@ -44,10 +44,15 @@ class Config
|
|||
public static $MessageListDateFilter = 0;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
* @var bool
|
||||
*/
|
||||
public static $LogSimpleLiterals = false;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public static $PreferStartTlsIfAutoDetect = true;
|
||||
|
||||
/**
|
||||
* @var \MailSo\Log\Logger|null
|
||||
*/
|
||||
|
|
|
@ -54,7 +54,8 @@ class ConnectionSecurityType
|
|||
public static function UseStartTLS($bSupported, $iSecurityType, $bHasSupportedAuth = true)
|
||||
{
|
||||
return ($bSupported &&
|
||||
(self::STARTTLS === $iSecurityType || (self::AUTO_DETECT === $iSecurityType && !$bHasSupportedAuth)) &&
|
||||
(self::STARTTLS === $iSecurityType ||
|
||||
(self::AUTO_DETECT === $iSecurityType && (!$bHasSupportedAuth || \MailSo\Config::$PreferStartTlsIfAutoDetect))) &&
|
||||
\defined('STREAM_CRYPTO_METHOD_TLS_CLIENT') && \MailSo\Base\Utils::FunctionExistsAndEnabled('stream_socket_enable_crypto'));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue