imap_copy
Example: imap_copy | Internet Messaging Functions (IMAP) |
Copies messages to a mailbox.
int imap_copy( char *transaction, char *message, char *mailbox, ENDITEM, LAST );
transaction | A transaction name for this step in quotes. To avoid creating a transaction for this step, use a null string, "". |
message | The message number or range of messages to copy. Use the following format:"Message= message_number | begin: end " |
mailbox | The name of the destination mailbox in the following format: "MAILBOX= mailbox_name" |
ENDITEM | A marker indicating the end of the message items. Repeat the message, mailbox and ENDITEM arguments for each set of messages you need to copy. |
LAST | A marker indicating the end of the argument list. |
The imap_copy function copies messages from the current mailbox into another mailbox. You can specify a single message or a range of messages to copy. If the destination mailbox does not exist, the server returns an error.
This function is for use with global sessions. For multiple sessions, use the imap_copy_ex function, which allows you to specify a session identifier.
Return Values
If this function succeeds, it returns LR_PASS. Otherwise, it returns LR_FAIL.
Parameterization
All arguments of this function of the type char, can be parameterized with standard parameterization.