|
|
@ -71,6 +71,8 @@ class rcube_imap
|
|
|
|
var $error_code = 0;
|
|
|
|
var $error_code = 0;
|
|
|
|
var $options = array('imap' => 'check');
|
|
|
|
var $options = array('imap' => 'check');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private $host, $user, $pass, $port, $ssl;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Object constructor
|
|
|
|
* Object constructor
|
|
|
@ -101,19 +103,22 @@ class rcube_imap
|
|
|
|
// check for Open-SSL support in PHP build
|
|
|
|
// check for Open-SSL support in PHP build
|
|
|
|
if ($use_ssl && extension_loaded('openssl'))
|
|
|
|
if ($use_ssl && extension_loaded('openssl'))
|
|
|
|
$ICL_SSL = $use_ssl == 'imaps' ? 'ssl' : $use_ssl;
|
|
|
|
$ICL_SSL = $use_ssl == 'imaps' ? 'ssl' : $use_ssl;
|
|
|
|
else if ($use_ssl)
|
|
|
|
else if ($use_ssl) {
|
|
|
|
{
|
|
|
|
|
|
|
|
raise_error(array('code' => 403, 'type' => 'imap', 'file' => __FILE__,
|
|
|
|
raise_error(array('code' => 403, 'type' => 'imap', 'file' => __FILE__,
|
|
|
|
'message' => 'Open SSL not available;'), TRUE, FALSE);
|
|
|
|
'message' => 'Open SSL not available;'), TRUE, FALSE);
|
|
|
|
$port = 143;
|
|
|
|
$port = 143;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$ICL_PORT = $port;
|
|
|
|
$ICL_PORT = $port;
|
|
|
|
$IMAP_USE_INTERNAL_DATE = false;
|
|
|
|
$IMAP_USE_INTERNAL_DATE = false;
|
|
|
|
|
|
|
|
|
|
|
|
$this->conn = iil_Connect($host, $user, $pass, $this->options);
|
|
|
|
$data = rcmail::get_instance()->plugins->exec_hook('imap_connect', array('host' => $host, 'user' => $user));
|
|
|
|
$this->host = $host;
|
|
|
|
if (!empty($data['pass']))
|
|
|
|
$this->user = $user;
|
|
|
|
$pass = $data['pass'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$this->conn = iil_Connect($data['host'], $data['user'], $pass, $this->options);
|
|
|
|
|
|
|
|
$this->host = $data['host'];
|
|
|
|
|
|
|
|
$this->user = $data['user'];
|
|
|
|
$this->pass = $pass;
|
|
|
|
$this->pass = $pass;
|
|
|
|
$this->port = $port;
|
|
|
|
$this->port = $port;
|
|
|
|
$this->ssl = $use_ssl;
|
|
|
|
$this->ssl = $use_ssl;
|
|
|
|