*
* See the enclosed file COPYING for license information (LGPL). If you
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*/
/* Include Horde's core.php file. */
include_once '../lib/core.php';
/* We should have loaded the String class, from the Horde_Util
* package, in core.php. If String:: isn't defined, then we're not
* finding some critical libraries. */
if (!class_exists('String')) {
echo '
The Horde_Util package was not found. If PHP\'s error_reporting setting is high enough, there should be error messages printed above that may help you in debugging the problem. If you are simply missing these files, then you need to get the framework module from Horde CVS, and install the packages in it with the install-packages.php script.';
exit;
}
/* Initialize the Horde_Test:: class. */
if (!is_readable('../lib/Test.php')) {
echo 'ERROR: You must install Horde before running this script.';
exit;
}
require_once '../lib/Test.php';
$horde_test = new Horde_Test;
/* MIMP version. */
$module = 'MIMP';
require_once './lib/version.php';
$module_version = MIMP_VERSION;
require TEST_TEMPLATES . 'header.inc';
require TEST_TEMPLATES . 'version.inc';
/* Display versions of other Horde applications. */
$app_list = array(
'imp' => array(
'version' => '4.0'
),
'turba' => array(
'error' => 'Turba provides addressbook/contacts capabilities to MIMP.',
'version' => '2.0'
)
);
$app_output = $horde_test->requiredAppCheck($app_list);
?>
./config/conf.php appears to be missing. You must generate this file as an administrator via Horde. See horde/docs/INSTALL.',
'config/mime_drivers.php' => null,
'config/prefs.php' => null,
'config/servers.php' => null
);
/* PEAR modules. */
$pear_list = array(
'Auth_SASL' => array(
'path' => 'Auth/SASL.php',
'error' => 'If your IMAP server uses CRAM-MD5 or DIGEST-MD5 authentication, this module is required.'
)
);
/* Get the status output now. */
$module_output = $horde_test->phpModuleCheck($module_list);
$file_output = $horde_test->requiredFileCheck($file_list);
$pear_output = $horde_test->PEARModuleCheck($pear_list);
?>
\n"; $mbox = imap_open($mbname, $user, $passwd); if ($mbox) { $minfo = imap_mailboxmsginfo($mbox); if ($minfo) { echo 'SUCCESS - INBOX has ', $minfo->Nmsgs, ' messages (' . $minfo->Unread, ' new ', $minfo->Recent, ' recent)'; $success[] = array('server' => $server, 'protocol' => $key, 'port' => $server_port); } else { echo 'ERROR - The server returned the following error message:' . "\n" . '\n'; foreach (imap_errors() as $error) { echo wordwrap($error); } echo ''; } imap_close($mbox); } else { echo 'ERROR - The server returned the following error message:' . "\n" . ''; foreach (imap_errors() as $error) { echo wordwrap($error); } echo ''; } echo "
Configuration " . $i++ . "\n"; } if ($type == 'imap') { echo "The following IMAP server information was discovered from the remote server:\n"; $config = reset($success); require_once './lib/IMAP/Client.php'; $imapclient = &new MIMP_IMAPClient($config['server'], $config['port'], $config['protocol']); $use_tls = $imapclient->useTLS(); if (!is_a($use_tls, 'PEAR_Error')) { $res = $imapclient->login($user, $passwd); } if (isset($res) && !is_a($res, 'PEAR_Error')) { echo ""; foreach ($val as $key => $entry) { echo "'" . $key . "' => '" . $entry . "'\n"; } echo "
Namespace Information\n"; echo ""; $namespace = $imapclient->namespace(); if (is_array($namespace)) { foreach ($namespace as $val) { echo "NAMESPACE: \"" . $val['name'] . "\"\n"; echo "DELIMITER: " . $val['delimiter'] . "\n"; echo "TYPE: " . $val['type'] . "\n\n"; } } else { echo "Could not retrieve namespace information from IMAP server.\n"; } echo "
IMAP CHILDREN support:\n"; $imapclient->logout(); } else { echo ""; echo ($imapclient->queryCapability('CHILDREN')) ? 'SUPPORTED' : 'Not supported'; echo "
Could not retrieve IMAP information from the remote server."; } } } else { echo "Could not determine a successful connection protocol. Make sure your mail server is running and you have specified the correct port.\n"; } } else { ?>