* eMail/IMAP: fix for failed connection for subsequent connects when using STARTTLS in certain enviroments

the buffering of capabilities triggers connections that STARTTLS to use these capabilities at the wrong time; thus we reset the capability buffered by icServer object
This commit is contained in:
Klaus Leithoff 2013-09-17 07:53:09 +00:00
parent fadccd0ece
commit 8f4c575de1

View File

@ -556,7 +556,9 @@ class defaultimap extends Net_IMAP
$options = $_options;
$this->isAdminConnection = false;
}
// the buffering of capabilities triggers connections that STARTTLS to use these capabilities at the wrong time
// $this->encryption == 1 -> STARTTLS
if ($this->encryption == 1) unset($this->_serverSupportedCapabilities);
$this->setStreamContextOptions($this->_getTransportOptions());
$this->_timeout = $_timeout;
if( PEAR::isError($status = parent::connect($this->_getTransportString(), $this->port, $this->encryption == 1)) ) {