/**
* Constructor.
*
* @param string $host OPTIONAL Hostname of remote connection (default: 127.0.0.1)
* @param integer $port OPTIONAL Port number (default: null)
* @throws Zend_Mail_Protocol_Exception
* @return void
*/
public function __construct($host = '127.0.0.1',
$port = null
) { $this->_validHost =
new Zend_Validate();
$this->_validHost->
addValidator(new Zend_Validate_Hostname(Zend_Validate_Hostname::ALLOW_ALL
));
if (!
$this->_validHost->
isValid($host)) { /**
* @see Zend_Mail_Protocol_Exception
*/
throw new Zend_Mail_Protocol_Exception(join(', ',
$this->_validHost->
getMessages()));
} $this->_host =
$host;
$this->_port =
$port;
}