Back to index

php5  5.3.10
mail_skipif.inc
Go to the documentation of this file.
00001 <?php
00002 extension_loaded('imap') or die('skip imap extension not available in this build');
00003  
00004 // Change these to make tests run successfully
00005 $mailbox  = '{localhost}';
00006 $username = 'webmaster@example.com';
00007 $password = 'p4ssw0rd';
00008 $options = OP_HALFOPEN; // this should be enough to verify server present
00009 $retries = 0; // dont retry connect on failure
00010 
00011 $mbox = imap_open($mailbox, $username, $password, $options, $retries);
00012 if (!$mbox) {
00013        die("skip could not connect to mailbox $mailbox");
00014 }
00015 imap_close($mbox);
00016 ?>