xref: /PHP-8.3/ext/imap/tests/setup/skipif.inc (revision b5a14e6c)
1<?php
2include __DIR__ . '/imap_include.inc';
3
4$options = OP_HALFOPEN; // this should be enough to verify server present
5$retries = 0; // don't retry connect on failure
6
7$mbox = @imap_open(IMAP_SERVER, IMAP_MAILBOX_USERNAME, IMAP_MAILBOX_PASSWORD, $options, $retries);
8if (!$mbox) {
9    die("skip could not connect to mailbox " . IMAP_SERVER);
10}
11imap_close($mbox);
12