2008-11-28 17:40:14 +00:00
|
|
|
<?php
|
|
|
|
extension_loaded('imap') or die('skip imap extension not available in this build');
|
|
|
|
|
|
|
|
// Change these to make tests run successfully
|
2008-12-05 11:02:04 +00:00
|
|
|
$mailbox = '{localhost/norsh}';
|
2008-11-28 17:40:14 +00:00
|
|
|
$username = 'webmaster@something.com';
|
|
|
|
$password = 'p4ssw0rd';
|
|
|
|
$options = OP_HALFOPEN; // this should be enough to verify server present
|
|
|
|
$retries = 0; // dont retry connect on failure
|
|
|
|
|
2009-02-15 16:03:39 +00:00
|
|
|
$mbox = @imap_open($mailbox, $username, $password, $options, $retries);
|
2008-11-28 17:40:14 +00:00
|
|
|
if (!$mbox) {
|
|
|
|
die("skip could not connect to mailbox $mailbox");
|
|
|
|
}
|
|
|
|
imap_close($mbox);
|
2008-12-05 11:02:04 +00:00
|
|
|
?>
|