$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 . ' )'
);
} $welcome =
$this->
readResponse();
strtok($welcome, '<'
);
$this->_timestamp =
strtok('>'
);
if (!
strpos($this->_timestamp, '@'
)) { $this->_timestamp = null;
} else { $this->_timestamp = '<' .
$this->_timestamp . '>';
} if ($ssl === 'TLS'
) { $this->
request('STLS'
);