mirror of
https://github.com/php/php-src.git
synced 2024-10-20 07:53:58 +00:00
16 lines
511 B
PHP
16 lines
511 B
PHP
<?php
|
|
extension_loaded('imap') or die('skip imap extension not available in this build');
|
|
|
|
// Change these to make tests run successfully
|
|
$mailbox = '{localhost}';
|
|
$username = 'webmaster@something.com';
|
|
$password = 'p4ssw0rd';
|
|
$options = OP_HALFOPEN; // this should be enough to verify server present
|
|
$retries = 0; // dont retry connect on failure
|
|
|
|
$mbox = imap_open($mailbox, $username, $password, $options, $retries);
|
|
if (!$mbox) {
|
|
die("skip could not connect to mailbox $mailbox");
|
|
}
|
|
imap_close($mbox);
|
|
?>
|