* Class depends on PHP pcre extension and fsockopen() function. Some features
* might require PHP 4.3.0 with OpenSSL or PHP 5.1.0+. Class checks those extra
* dependencies internally, if used function needs it.
- * @copyright © 2006 The SquirrelMail Project Team
+ * @copyright 2006-2014 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package plugins
if($this->check_response()) {
$ret = '';
while($line = fgets($this->conn)) {
- if (trim($line)=='.') {
+ if ($line == ".\r\n") {
break;
+ } elseif ( $line{0} == '.' ) {
+ $ret .= substr($line,1);
} else {
$ret.= $line;
}
}
fwrite($this->conn,"STLS\r\n");
if (! $this->check_response()) {
- $this->command_quit();
- return false;
+ $this->command_quit();
+ return false;
}
if (@stream_socket_enable_crypto($this->conn,true,STREAM_CRYPTO_METHOD_TLS_CLIENT)) {