if ($port === null
) { $port =
$ssl === 'SSL' ? 993 : 143;
} $errno = 0;
$errstr = '';
$this->_socket = @
fsockopen($host,
$port,
$errno,
$errstr, self::TIMEOUT_CONNECTION
);
if (!
$this->_socket
) { /**
* @see Zend_Mail_Protocol_Exception
*/
throw new Zend_Mail_Protocol_Exception('cannot connect to host; error = ' .
$errstr .
' (errno = ' .
$errno . ' )'
);
} if (!
$this->
_assumedNextLine('* OK'
)) { /**
* @see Zend_Mail_Protocol_Exception
*/
throw new Zend_Mail_Protocol_Exception('host doesn\'t allow connection'
);
} if ($ssl === 'TLS'
) {