Example: imap_copy_ex
In the following example, the imap_copy_ex function copies several messages from the current mailbox. It copies messages 2 through 4 to the Meeting mailbox, and message 10 to the Archived mailbox.
imap_copy_ex(&imap1, "CopyToFolders", "Message=2:4", "ToMailbox=Meeting", ENDITEM, "Message=10", "ToMailbox=Archived", ENDITEM, LAST );