2 Test imap_mail_copy() function : basic functionality
7 require_once(dirname(__FILE__).'/skipif.inc');
11 /* Prototype : bool imap_mail_copy ( resource $imap_stream , string $msglist , string $mailbox [, int $options = 0 ] )
12 * Description: Copies mail messages specified by msglist to specified mailbox.
13 * Source code: ext/imap/php_imap.c
16 echo "*** Testing imap_mail_copy() : basic functionality ***\n";
18 require_once(dirname(__FILE__).'/imap_include.inc');
21 echo "Create a new mailbox for test\n";
22 $imap_stream = setup_test_mailbox("", 1);
23 if (!is_resource($imap_stream)) {
24 exit("TEST FAILED: Unable to create test mailbox\n");
27 $check = imap_check($imap_stream);
28 echo "Msg Count in new mailbox: ". $check->Nmsgs . "\n";
30 var_dump(imap_mail_copy($imap_stream, '1', 'INBOX.'.$mailbox_prefix));
32 imap_close($imap_stream);
37 require_once('clean.inc');
40 *** Testing imap_mail_copy() : basic functionality ***
41 Create a new mailbox for test
42 Create a temporary mailbox and add 1 msgs
43 .. mailbox '%s' created
44 Msg Count in new mailbox: 1