29 require_once
"Auth/Container.php";
34 require_once
"PEAR.php";
108 if (!extension_loaded(
'imap')) {
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 =
'';