Added "Verify ssl certificate" setting in domain configuration popup (Closes #332)

This commit is contained in:
RainLoop Team 2014-10-07 01:47:21 +04:00
parent c8bd765e12
commit 49f6c8bbe9
11 changed files with 87 additions and 34 deletions

View file

@ -210,8 +210,8 @@
}; };
RemoteAdminStorage.prototype.createOrUpdateDomain = function (fCallback, RemoteAdminStorage.prototype.createOrUpdateDomain = function (fCallback,
bCreate, sName, sIncHost, iIncPort, sIncSecure, bIncShortLogin, bCreate, sName, sIncHost, iIncPort, sIncSecure, bIncVerifySsl, bIncShortLogin,
sOutHost, iOutPort, sOutSecure, bOutShortLogin, bOutAuth, sWhiteList) sOutHost, iOutPort, sOutSecure, bOutShortLogin, bOutVerifySsl, bOutAuth, sWhiteList)
{ {
this.defaultRequest(fCallback, 'AdminDomainSave', { this.defaultRequest(fCallback, 'AdminDomainSave', {
'Create': bCreate ? '1' : '0', 'Create': bCreate ? '1' : '0',
@ -219,10 +219,12 @@
'IncHost': sIncHost, 'IncHost': sIncHost,
'IncPort': iIncPort, 'IncPort': iIncPort,
'IncSecure': sIncSecure, 'IncSecure': sIncSecure,
'IncVerifySsl': bIncVerifySsl ? '1' : '0',
'IncShortLogin': bIncShortLogin ? '1' : '0', 'IncShortLogin': bIncShortLogin ? '1' : '0',
'OutHost': sOutHost, 'OutHost': sOutHost,
'OutPort': iOutPort, 'OutPort': iOutPort,
'OutSecure': sOutSecure, 'OutSecure': sOutSecure,
'OutVerifySsl': bOutVerifySsl ? '1' : '0',
'OutShortLogin': bOutShortLogin ? '1' : '0', 'OutShortLogin': bOutShortLogin ? '1' : '0',
'OutAuth': bOutAuth ? '1' : '0', 'OutAuth': bOutAuth ? '1' : '0',
'WhiteList': sWhiteList 'WhiteList': sWhiteList
@ -230,17 +232,19 @@
}; };
RemoteAdminStorage.prototype.testConnectionForDomain = function (fCallback, sName, RemoteAdminStorage.prototype.testConnectionForDomain = function (fCallback, sName,
sIncHost, iIncPort, sIncSecure, sIncHost, iIncPort, sIncSecure, bIncVerifySsl,
sOutHost, iOutPort, sOutSecure, bOutAuth) sOutHost, iOutPort, sOutSecure, bOutVerifySsl, bOutAuth)
{ {
this.defaultRequest(fCallback, 'AdminDomainTest', { this.defaultRequest(fCallback, 'AdminDomainTest', {
'Name': sName, 'Name': sName,
'IncHost': sIncHost, 'IncHost': sIncHost,
'IncPort': iIncPort, 'IncPort': iIncPort,
'IncSecure': sIncSecure, 'IncSecure': sIncSecure,
'IncVerifySsl': bIncVerifySsl ? '1' : '0',
'OutHost': sOutHost, 'OutHost': sOutHost,
'OutPort': iOutPort, 'OutPort': iOutPort,
'OutSecure': sOutSecure, 'OutSecure': sOutSecure,
'OutVerifySsl': bOutVerifySsl ? '1' : '0',
'OutAuth': bOutAuth ? '1' : '0' 'OutAuth': bOutAuth ? '1' : '0'
}); });
}; };

View file

@ -63,10 +63,12 @@
this.imapServer = ko.observable(''); this.imapServer = ko.observable('');
this.imapPort = ko.observable('' + Consts.Values.ImapDefaulPort); this.imapPort = ko.observable('' + Consts.Values.ImapDefaulPort);
this.imapSecure = ko.observable(Enums.ServerSecure.None); this.imapSecure = ko.observable(Enums.ServerSecure.None);
this.imapVerifySsl = ko.observable(false);
this.imapShortLogin = ko.observable(false); this.imapShortLogin = ko.observable(false);
this.smtpServer = ko.observable(''); this.smtpServer = ko.observable('');
this.smtpPort = ko.observable('' + Consts.Values.SmtpDefaulPort); this.smtpPort = ko.observable('' + Consts.Values.SmtpDefaulPort);
this.smtpSecure = ko.observable(Enums.ServerSecure.None); this.smtpSecure = ko.observable(Enums.ServerSecure.None);
this.smtpVerifySsl = ko.observable(false);
this.smtpShortLogin = ko.observable(false); this.smtpShortLogin = ko.observable(false);
this.smtpAuth = ko.observable(true); this.smtpAuth = ko.observable(true);
this.whiteList = ko.observable(''); this.whiteList = ko.observable('');
@ -102,10 +104,12 @@
this.imapServer(), this.imapServer(),
Utils.pInt(this.imapPort()), Utils.pInt(this.imapPort()),
this.imapSecure(), this.imapSecure(),
this.imapVerifySsl(),
this.imapShortLogin(), this.imapShortLogin(),
this.smtpServer(), this.smtpServer(),
Utils.pInt(this.smtpPort()), Utils.pInt(this.smtpPort()),
this.smtpSecure(), this.smtpSecure(),
this.smtpVerifySsl(),
this.smtpShortLogin(), this.smtpShortLogin(),
this.smtpAuth(), this.smtpAuth(),
this.whiteList() this.whiteList()
@ -124,9 +128,11 @@
this.imapServer(), this.imapServer(),
Utils.pInt(this.imapPort()), Utils.pInt(this.imapPort()),
this.imapSecure(), this.imapSecure(),
this.imapVerifySsl(),
this.smtpServer(), this.smtpServer(),
Utils.pInt(this.smtpPort()), Utils.pInt(this.smtpPort()),
this.smtpSecure(), this.smtpSecure(),
this.smtpVerifySsl(),
this.smtpAuth() this.smtpAuth()
); );
}, this.canBeTested); }, this.canBeTested);
@ -273,10 +279,12 @@
this.imapServer(Utils.trim(oDomain.IncHost)); this.imapServer(Utils.trim(oDomain.IncHost));
this.imapPort('' + Utils.pInt(oDomain.IncPort)); this.imapPort('' + Utils.pInt(oDomain.IncPort));
this.imapSecure(Utils.trim(oDomain.IncSecure)); this.imapSecure(Utils.trim(oDomain.IncSecure));
this.imapVerifySsl(!!oDomain.IncVerifySsl);
this.imapShortLogin(!!oDomain.IncShortLogin); this.imapShortLogin(!!oDomain.IncShortLogin);
this.smtpServer(Utils.trim(oDomain.OutHost)); this.smtpServer(Utils.trim(oDomain.OutHost));
this.smtpPort('' + Utils.pInt(oDomain.OutPort)); this.smtpPort('' + Utils.pInt(oDomain.OutPort));
this.smtpSecure(Utils.trim(oDomain.OutSecure)); this.smtpSecure(Utils.trim(oDomain.OutSecure));
this.smtpVerifySsl(!!oDomain.OutVerifySsl);
this.smtpShortLogin(!!oDomain.OutShortLogin); this.smtpShortLogin(!!oDomain.OutShortLogin);
this.smtpAuth(!!oDomain.OutAuth); this.smtpAuth(!!oDomain.OutAuth);
this.whiteList(Utils.trim(oDomain.WhiteList)); this.whiteList(Utils.trim(oDomain.WhiteList));
@ -304,10 +312,12 @@
this.imapServer(''); this.imapServer('');
this.imapPort('' + Consts.Values.ImapDefaulPort); this.imapPort('' + Consts.Values.ImapDefaulPort);
this.imapSecure(Enums.ServerSecure.None); this.imapSecure(Enums.ServerSecure.None);
this.imapVerifySsl(false);
this.imapShortLogin(false); this.imapShortLogin(false);
this.smtpServer(''); this.smtpServer('');
this.smtpPort('' + Consts.Values.SmtpDefaulPort); this.smtpPort('' + Consts.Values.SmtpDefaulPort);
this.smtpSecure(Enums.ServerSecure.None); this.smtpSecure(Enums.ServerSecure.None);
this.smtpVerifySsl(false);
this.smtpShortLogin(false); this.smtpShortLogin(false);
this.smtpAuth(true); this.smtpAuth(true);
this.whiteList(''); this.whiteList('');

View file

@ -1,7 +1,9 @@
imap_host = "imap.gmail.com" imap_host = "imap.gmail.com"
imap_port = 993 imap_port = 993
imap_secure = "SSL" imap_secure = "SSL"
imap_verify_ssl = Off
smtp_host = "smtp.gmail.com" smtp_host = "smtp.gmail.com"
smtp_port = 465 smtp_port = 465
smtp_secure = "SSL" smtp_secure = "SSL"
smtp_verify_ssl = Off
smtp_auth = On smtp_auth = On

View file

@ -1,7 +1,9 @@
imap_host = "imap-mail.outlook.com" imap_host = "imap-mail.outlook.com"
imap_port = 993 imap_port = 993
imap_secure = "SSL" imap_secure = "SSL"
imap_verify_ssl = Off
smtp_host = "smtp-mail.outlook.com" smtp_host = "smtp-mail.outlook.com"
smtp_port = 587 smtp_port = 587
smtp_secure = "TLS" smtp_secure = "TLS"
smtp_verify_ssl = Off
smtp_auth = On smtp_auth = On

View file

@ -1,7 +1,9 @@
imap_host = "imap.qq.com" imap_host = "imap.qq.com"
imap_port = 993 imap_port = 993
imap_secure = "SSL" imap_secure = "SSL"
imap_verify_ssl = Off
smtp_host = "smtp.qq.com" smtp_host = "smtp.qq.com"
smtp_port = 465 smtp_port = 465
smtp_secure = "SSL" smtp_secure = "SSL"
smtp_verify_ssl = Off
smtp_auth = On smtp_auth = On

View file

@ -1,7 +1,9 @@
imap_host = "imap.mail.yahoo.com" imap_host = "imap.mail.yahoo.com"
imap_port = 993 imap_port = 993
imap_secure = "SSL" imap_secure = "SSL"
imap_verify_ssl = Off
smtp_host = "smtp.mail.yahoo.com" smtp_host = "smtp.mail.yahoo.com"
smtp_port = 465 smtp_port = 465
smtp_secure = "SSL" smtp_secure = "SSL"
smtp_verify_ssl = Off
smtp_auth = On smtp_auth = On

View file

@ -123,6 +123,7 @@ class Utils
*/ */
public static function ConvertSystemString($sSrt) public static function ConvertSystemString($sSrt)
{ {
$sSrt = \trim($sSrt);
if (!empty($sSrt) && !\MailSo\Base\Utils::IsUtf8($sSrt)) if (!empty($sSrt) && !\MailSo\Base\Utils::IsUtf8($sSrt))
{ {
$sCharset = \MailSo\Base\Utils::DetectSystemCharset(); $sCharset = \MailSo\Base\Utils::DetectSystemCharset();

View file

@ -78,27 +78,29 @@ class Domain
* @param string $sIncHost * @param string $sIncHost
* @param int $iIncPort * @param int $iIncPort
* @param int $iIncSecure * @param int $iIncSecure
* @param bool $bIncVerifySsl
* @param bool $bIncShortLogin * @param bool $bIncShortLogin
* @param string $sOutHost * @param string $sOutHost
* @param int $iOutPort * @param int $iOutPort
* @param int $iOutSecure * @param int $iOutSecure
* @param bool $bOutVerifySsl
* @param bool $bOutShortLogin * @param bool $bOutShortLogin
* @param bool $bOutAuth * @param bool $bOutAuth
* @param string $sWhiteList = '' * @param string $sWhiteList = ''
*/ */
private function __construct($sName, $sIncHost, $iIncPort, $iIncSecure, $bIncShortLogin, private function __construct($sName, $sIncHost, $iIncPort, $iIncSecure, $bIncVerifySsl, $bIncShortLogin,
$sOutHost, $iOutPort, $iOutSecure, $bOutShortLogin, $bOutAuth, $sWhiteList = '') $sOutHost, $iOutPort, $iOutSecure, $bOutVerifySsl, $bOutShortLogin, $bOutAuth, $sWhiteList = '')
{ {
$this->sName = $sName; $this->sName = $sName;
$this->sIncHost = $sIncHost; $this->sIncHost = $sIncHost;
$this->iIncPort = $iIncPort; $this->iIncPort = $iIncPort;
$this->iIncSecure = $iIncSecure; $this->iIncSecure = $iIncSecure;
$this->bIncVerifySsl = false; $this->bIncVerifySsl = !!$bIncVerifySsl;
$this->bIncShortLogin = $bIncShortLogin; $this->bIncShortLogin = $bIncShortLogin;
$this->sOutHost = $sOutHost; $this->sOutHost = $sOutHost;
$this->iOutPort = $iOutPort; $this->iOutPort = $iOutPort;
$this->iOutSecure = $iOutSecure; $this->iOutSecure = $iOutSecure;
$this->bOutVerifySsl = false; $this->bOutVerifySsl = !!$bOutVerifySsl;
$this->bOutShortLogin = $bOutShortLogin; $this->bOutShortLogin = $bOutShortLogin;
$this->bOutAuth = $bOutAuth; $this->bOutAuth = $bOutAuth;
$this->sWhiteList = \trim($sWhiteList); $this->sWhiteList = \trim($sWhiteList);
@ -109,10 +111,12 @@ class Domain
* @param string $sIncHost * @param string $sIncHost
* @param int $iIncPort * @param int $iIncPort
* @param int $iIncSecure * @param int $iIncSecure
* @param bool $bIncVerifySsl
* @param bool $bIncShortLogin * @param bool $bIncShortLogin
* @param string $sOutHost * @param string $sOutHost
* @param int $iOutPort * @param int $iOutPort
* @param int $iOutSecure * @param int $iOutSecure
* @param bool $bOutVerifySsl
* @param bool $bOutShortLogin * @param bool $bOutShortLogin
* @param bool $bOutAuth * @param bool $bOutAuth
* @param string $sWhiteList = '' * @param string $sWhiteList = ''
@ -120,13 +124,13 @@ class Domain
* @return \RainLoop\Domain * @return \RainLoop\Domain
*/ */
public static function NewInstance($sName, public static function NewInstance($sName,
$sIncHost, $iIncPort, $iIncSecure, $bIncShortLogin, $sIncHost, $iIncPort, $iIncSecure, $bIncVerifySsl, $bIncShortLogin,
$sOutHost, $iOutPort, $iOutSecure, $bOutShortLogin, $bOutAuth, $sOutHost, $iOutPort, $iOutSecure, $bOutVerifySsl, $bOutShortLogin, $bOutAuth,
$sWhiteList = '') $sWhiteList = '')
{ {
return new self($sName, return new self($sName,
$sIncHost, $iIncPort, $iIncSecure, $bIncShortLogin, $sIncHost, $iIncPort, $iIncSecure, $bIncVerifySsl, $bIncShortLogin,
$sOutHost, $iOutPort, $iOutSecure, $bOutShortLogin, $bOutAuth, $sOutHost, $iOutPort, $iOutSecure, $bOutVerifySsl, $bOutShortLogin, $bOutAuth,
$sWhiteList); $sWhiteList);
} }
@ -148,11 +152,15 @@ class Domain
$iIncSecure = self::StrConnectionSecurityTypeToCons( $iIncSecure = self::StrConnectionSecurityTypeToCons(
!empty($aDomain['imap_secure']) ? $aDomain['imap_secure'] : ''); !empty($aDomain['imap_secure']) ? $aDomain['imap_secure'] : '');
$bIncVerifySsl = isset($aDomain['imap_verify_ssl']) ? (bool) $aDomain['smtp_verify_ssl'] : false;;
$sOutHost = (string) $aDomain['smtp_host']; $sOutHost = (string) $aDomain['smtp_host'];
$iOutPort = (int) $aDomain['smtp_port']; $iOutPort = (int) $aDomain['smtp_port'];
$iOutSecure = self::StrConnectionSecurityTypeToCons( $iOutSecure = self::StrConnectionSecurityTypeToCons(
!empty($aDomain['smtp_secure']) ? $aDomain['smtp_secure'] : ''); !empty($aDomain['smtp_secure']) ? $aDomain['smtp_secure'] : '');
$bOutVerifySsl = isset($aDomain['smtp_verify_ssl']) ? (bool) $aDomain['smtp_verify_ssl'] : false;
$bOutAuth = isset($aDomain['smtp_auth']) ? (bool) $aDomain['smtp_auth'] : true; $bOutAuth = isset($aDomain['smtp_auth']) ? (bool) $aDomain['smtp_auth'] : true;
$sWhiteList = (string) (isset($aDomain['white_list']) ? $aDomain['white_list'] : ''); $sWhiteList = (string) (isset($aDomain['white_list']) ? $aDomain['white_list'] : '');
@ -160,8 +168,8 @@ class Domain
$bOutShortLogin = isset($aDomain['smtp_short_login']) ? (bool) $aDomain['smtp_short_login'] : false; $bOutShortLogin = isset($aDomain['smtp_short_login']) ? (bool) $aDomain['smtp_short_login'] : false;
$oDomain = self::NewInstance($sName, $oDomain = self::NewInstance($sName,
$sIncHost, $iIncPort, $iIncSecure, $bIncShortLogin, $sIncHost, $iIncPort, $iIncSecure, $bIncVerifySsl, $bIncShortLogin,
$sOutHost, $iOutPort, $iOutSecure, $bOutShortLogin, $bOutAuth, $sOutHost, $iOutPort, $iOutSecure, $bOutVerifySsl, $bOutShortLogin, $bOutAuth,
$sWhiteList); $sWhiteList);
} }
@ -205,10 +213,12 @@ class Domain
'imap_host = "'.$this->encodeIniString($this->sIncHost).'"', 'imap_host = "'.$this->encodeIniString($this->sIncHost).'"',
'imap_port = '.$this->iIncPort, 'imap_port = '.$this->iIncPort,
'imap_secure = "'.self::ConstConnectionSecurityTypeToStr($this->iIncSecure).'"', 'imap_secure = "'.self::ConstConnectionSecurityTypeToStr($this->iIncSecure).'"',
'imap_verify_ssl = '.($this->bIncVerifySsl ? 'On' : 'Off'),
'imap_short_login = '.($this->bIncShortLogin ? 'On' : 'Off'), 'imap_short_login = '.($this->bIncShortLogin ? 'On' : 'Off'),
'smtp_host = "'.$this->encodeIniString($this->sOutHost).'"', 'smtp_host = "'.$this->encodeIniString($this->sOutHost).'"',
'smtp_port = '.$this->iOutPort, 'smtp_port = '.$this->iOutPort,
'smtp_secure = "'.self::ConstConnectionSecurityTypeToStr($this->iOutSecure).'"', 'smtp_secure = "'.self::ConstConnectionSecurityTypeToStr($this->iOutSecure).'"',
'smtp_verify_ssl = '.($this->bOutVerifySsl ? 'On' : 'Off'),
'smtp_short_login = '.($this->bOutShortLogin ? 'On' : 'Off'), 'smtp_short_login = '.($this->bOutShortLogin ? 'On' : 'Off'),
'smtp_auth = '.($this->bOutAuth ? 'On' : 'Off'), 'smtp_auth = '.($this->bOutAuth ? 'On' : 'Off'),
'white_list = "'.$this->encodeIniString($this->sWhiteList).'"' 'white_list = "'.$this->encodeIniString($this->sWhiteList).'"'
@ -260,10 +270,12 @@ class Domain
* @param string $sIncHost * @param string $sIncHost
* @param int $iIncPort * @param int $iIncPort
* @param int $iIncSecure * @param int $iIncSecure
* @param bool $bIncVerifySsl
* @param bool $bIncShortLogin * @param bool $bIncShortLogin
* @param string $sOutHost * @param string $sOutHost
* @param int $iOutPort * @param int $iOutPort
* @param int $iOutSecure * @param int $iOutSecure
* @param bool $bOutVerifySsl
* @param bool $bOutShortLogin * @param bool $bOutShortLogin
* @param bool $bOutAuth * @param bool $bOutAuth
* @param string $sWhiteList = '' * @param string $sWhiteList = ''
@ -271,17 +283,19 @@ class Domain
* @return \RainLoop\Domain * @return \RainLoop\Domain
*/ */
public function UpdateInstance( public function UpdateInstance(
$sIncHost, $iIncPort, $iIncSecure, $bIncShortLogin, $sIncHost, $iIncPort, $iIncSecure, $bIncVerifySsl, $bIncShortLogin,
$sOutHost, $iOutPort, $iOutSecure, $bOutShortLogin, $bOutAuth, $sOutHost, $iOutPort, $iOutSecure, $bOutVerifySsl, $bOutShortLogin, $bOutAuth,
$sWhiteList = '') $sWhiteList = '')
{ {
$this->sIncHost = \MailSo\Base\Utils::IdnToAscii($sIncHost); $this->sIncHost = \MailSo\Base\Utils::IdnToAscii($sIncHost);
$this->iIncPort = $iIncPort; $this->iIncPort = $iIncPort;
$this->iIncSecure = $iIncSecure; $this->iIncSecure = $iIncSecure;
$this->bIncVerifySsl = !!$bIncVerifySsl;
$this->bIncShortLogin = $bIncShortLogin; $this->bIncShortLogin = $bIncShortLogin;
$this->sOutHost = \MailSo\Base\Utils::IdnToAscii($sOutHost); $this->sOutHost = \MailSo\Base\Utils::IdnToAscii($sOutHost);
$this->iOutPort = $iOutPort; $this->iOutPort = $iOutPort;
$this->iOutSecure = $iOutSecure; $this->iOutSecure = $iOutSecure;
$this->bOutVerifySsl = !!$bOutVerifySsl;
$this->bOutShortLogin = $bOutShortLogin; $this->bOutShortLogin = $bOutShortLogin;
$this->bOutAuth = $bOutAuth; $this->bOutAuth = $bOutAuth;
$this->sWhiteList = \trim($sWhiteList); $this->sWhiteList = \trim($sWhiteList);
@ -432,10 +446,12 @@ class Domain
'IncHost' => $bAjax ? \MailSo\Base\Utils::IdnToUtf8($this->IncHost()) : $this->IncHost(), 'IncHost' => $bAjax ? \MailSo\Base\Utils::IdnToUtf8($this->IncHost()) : $this->IncHost(),
'IncPort' => $this->IncPort(), 'IncPort' => $this->IncPort(),
'IncSecure' => $this->IncSecure(), 'IncSecure' => $this->IncSecure(),
'IncVerifySsl' => $this->IncVerifySsl(),
'IncShortLogin' => $this->IncShortLogin(), 'IncShortLogin' => $this->IncShortLogin(),
'OutHost' => $bAjax ? \MailSo\Base\Utils::IdnToUtf8($this->OutHost()) : $this->OutHost(), 'OutHost' => $bAjax ? \MailSo\Base\Utils::IdnToUtf8($this->OutHost()) : $this->OutHost(),
'OutPort' => $this->OutPort(), 'OutPort' => $this->OutPort(),
'OutSecure' => $this->OutSecure(), 'OutSecure' => $this->OutSecure(),
'OutVerifySsl' => $this->OutVerifySsl(),
'OutShortLogin' => $this->OutShortLogin(), 'OutShortLogin' => $this->OutShortLogin(),
'OutAuth' => $this->OutAuth(), 'OutAuth' => $this->OutAuth(),
'WhiteList' => $this->WhiteList() 'WhiteList' => $this->WhiteList()

View file

@ -115,10 +115,12 @@ class Domain extends \RainLoop\Providers\AbstractProvider
$sIncHost = (string) $oActions->GetActionParam('IncHost', ''); $sIncHost = (string) $oActions->GetActionParam('IncHost', '');
$iIncPort = (int) $oActions->GetActionParam('IncPort', 143); $iIncPort = (int) $oActions->GetActionParam('IncPort', 143);
$iIncSecure = (int) $oActions->GetActionParam('IncSecure', \MailSo\Net\Enumerations\ConnectionSecurityType::NONE); $iIncSecure = (int) $oActions->GetActionParam('IncSecure', \MailSo\Net\Enumerations\ConnectionSecurityType::NONE);
$bIncVerifySsl = '1' === (string) $oActions->GetActionParam('IncVerifySsl', '0');
$bIncShortLogin = '1' === (string) $oActions->GetActionParam('IncShortLogin', '0'); $bIncShortLogin = '1' === (string) $oActions->GetActionParam('IncShortLogin', '0');
$sOutHost = (string) $oActions->GetActionParam('OutHost', ''); $sOutHost = (string) $oActions->GetActionParam('OutHost', '');
$iOutPort = (int) $oActions->GetActionParam('OutPort', 25); $iOutPort = (int) $oActions->GetActionParam('OutPort', 25);
$iOutSecure = (int) $oActions->GetActionParam('OutSecure', \MailSo\Net\Enumerations\ConnectionSecurityType::NONE); $iOutSecure = (int) $oActions->GetActionParam('OutSecure', \MailSo\Net\Enumerations\ConnectionSecurityType::NONE);
$bOutVerifySsl = '1' === (string) $oActions->GetActionParam('OutVerifySsl', '0');
$bOutShortLogin = '1' === (string) $oActions->GetActionParam('OutShortLogin', '0'); $bOutShortLogin = '1' === (string) $oActions->GetActionParam('OutShortLogin', '0');
$bOutAuth = '1' === (string) $oActions->GetActionParam('OutAuth', '1'); $bOutAuth = '1' === (string) $oActions->GetActionParam('OutAuth', '1');
$sWhiteList = (string) $oActions->GetActionParam('WhiteList', ''); $sWhiteList = (string) $oActions->GetActionParam('WhiteList', '');
@ -140,16 +142,16 @@ class Domain extends \RainLoop\Providers\AbstractProvider
else else
{ {
$oDomain->UpdateInstance( $oDomain->UpdateInstance(
$sIncHost, $iIncPort, $iIncSecure, $bIncShortLogin, $sIncHost, $iIncPort, $iIncSecure, $bIncVerifySsl, $bIncShortLogin,
$sOutHost, $iOutPort, $iOutSecure, $bOutShortLogin, $bOutAuth, $sOutHost, $iOutPort, $iOutSecure, $bOutVerifySsl, $bOutShortLogin, $bOutAuth,
$sWhiteList); $sWhiteList);
} }
} }
else else
{ {
$oDomain = \RainLoop\Domain::NewInstance(0 < strlen($sNameForTest) ? $sNameForTest : $sName, $oDomain = \RainLoop\Domain::NewInstance(0 < strlen($sNameForTest) ? $sNameForTest : $sName,
$sIncHost, $iIncPort, $iIncSecure, $bIncShortLogin, $sIncHost, $iIncPort, $iIncSecure, $bIncVerifySsl, $bIncShortLogin,
$sOutHost, $iOutPort, $iOutSecure, $bOutShortLogin, $bOutAuth, $sOutHost, $iOutPort, $iOutSecure, $bOutVerifySsl, $bOutShortLogin, $bOutAuth,
$sWhiteList); $sWhiteList);
} }
} }

View file

@ -47,6 +47,12 @@
<option value="1">SSL/TLS</option> <option value="1">SSL/TLS</option>
<option value="2">STARTTLS</option> <option value="2">STARTTLS</option>
</select> </select>
&nbsp;&nbsp;&nbsp;&nbsp;
<label class="inline" data-bind="visible: '1' === imapSecure(), click: function () { imapVerifySsl(!imapVerifySsl()); }">
<i data-bind="css: imapVerifySsl() ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked'"></i>
&nbsp;&nbsp;
Verify ssl certificate
</label>
</div> </div>
</div> </div>
<br /> <br />
@ -88,6 +94,12 @@
<option value="1">SSL/TLS</option> <option value="1">SSL/TLS</option>
<option value="2">STARTTLS</option> <option value="2">STARTTLS</option>
</select> </select>
&nbsp;&nbsp;&nbsp;&nbsp;
<label class="inline" data-bind="visible: '1' === smtpSecure(), click: function () { smtpVerifySsl(!smtpVerifySsl()); }">
<i data-bind="css: smtpVerifySsl() ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked'"></i>
&nbsp;&nbsp;
Verify ssl certificate
</label>
</div> </div>
</div> </div>
<br /> <br />