1<?php 2extension_loaded('imap') or die('skip imap extension not available in this build'); 3 4include __DIR__ . '/imap_include.inc'; 5 6$options = OP_HALFOPEN; // this should be enough to verify server present 7$retries = 0; // don't retry connect on failure 8 9$mbox = @imap_open(IMAP_SERVER, IMAP_MAILBOX_USERNAME, IMAP_MAILBOX_PASSWORD, $options, $retries); 10if (!$mbox) { 11 die("skip could not connect to mailbox " . IMAP_SERVER); 12} 13imap_close($mbox); 14