File: skipif.inc

package info (click to toggle)
php-imap 3%3A1.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 708 kB
  • sloc: ansic: 3,842; xml: 153; php: 149; pascal: 112; sh: 6; makefile: 3
file content (11 lines) | stat: -rw-r--r-- 364 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
<?php
include __DIR__ . '/imap_include.inc';

$options = OP_HALFOPEN; // this should be enough to verify server present
$retries = 0; // don't retry connect on failure

$mbox = @imap_open(IMAP_SERVER, IMAP_MAILBOX_USERNAME, IMAP_MAILBOX_PASSWORD, $options, $retries);
if (!$mbox) {
    die("skip could not connect to mailbox " . IMAP_SERVER);
}
imap_close($mbox);