29 require_once
"Auth/Container.php";
34 require_once
"PEAR.php";
108 if (!extension_loaded(
'imap')) {
115 if (is_array($params)) {
119 if ($this->options[
'checkServer']) {
135 $this->options[
'host'] =
'localhost';
136 $this->options[
'port'] = 143;
137 $this->options[
'baseDSN'] =
'';
138 $this->options[
'checkServer'] =
true;
139 $this->options[
'timeout'] = 20;
152 $fp = @fsockopen ($this->options[
'host'], $this->options[
'port'],
153 $errno, $errstr, $this->options[
'timeout']);
154 if (is_resource($fp)) {
157 $message =
"Error connecting to IMAP server " 158 . $this->options[
'host']
159 .
":" . $this->options[
'port'];
175 foreach ($array as $key => $value) {
176 $this->options[$key] = $value;
193 $dsn =
'{'.$this->options[
'host'].
':'.$this->options[
'port'].$this->options[
'baseDSN'].
'}';
194 $conn = @imap_open ($dsn, $username, $password, OP_HALFOPEN);
195 if (is_resource($conn)) {
197 $this->activeUser = $username;
202 $this->activeUser =
'';
_parseOptions($array)
Parse options passed to the container class.
fetchData($username, $password)
Try to open a IMAP stream using $username / $password.
const AUTH_LOG_DEBUG
Auth Log level - DEBUG.
_checkServer()
Check if the given server and port are reachable.
Auth_Container_IMAP($params)
Constructor of the container class.
& raiseError($message=null, $code=null, $mode=null, $options=null, $userinfo=null, $error_class=null, $skipmsg=false)
This method is a wrapper that returns an instance of the configured error class with this object's de...
log($message, $level=AUTH_LOG_DEBUG)
Log a message to the Auth log.
_setDefaults()
Set some default options.