summaryrefslogtreecommitdiff
path: root/ext/imap/tests/skipif.inc
blob: 19ad7893bdb33d1e020cdff393942ce9c099db75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php
extension_loaded('imap') or die('skip imap extension not available in this build');

// Change these to make tests run successfully
$mailbox  = '{localhost/norsh}';
$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);
?>