/**
* @see Zend_Mail_Storage_Exception
*/
throw new Zend_Mail_Storage_Exception('need at least user in params'
);
} $host =
isset($params->host
) ?
$params->host : 'localhost';
$password =
isset($params->password
) ?
$params->password : '';
$port =
isset($params->port
) ?
$params->port : null;
$ssl =
isset($params->ssl
) ?
$params->ssl : false;
$this->_protocol =
new Zend_Mail_Protocol_Imap();
$this->_protocol->
connect($host,
$port,
$ssl);
if (!
$this->_protocol->
login($params->user,
$password)) { /**
* @see Zend_Mail_Storage_Exception
*/
throw new Zend_Mail_Storage_Exception('cannot login, user or password wrong'
);
} $this->
selectFolder(isset($params->folder
) ?
$params->folder : 'INBOX'
);
} /**
* Close resource for mail lib. If you need to control, when the resource
* is closed. Otherwise the destructor would call this.
*
* @return null
*/