Share this page

# imap_copy_ex

Example: imap_copy_ex | Internet Messaging Functions (IMAP)

Copies messages to a mailbox for a specific session.

    int imap_copy_ex( IMAP *ppimap, char *transaction, char *message, char *mailbox, ENDITEM, LAST );

ppimap | A session identifier.
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_ex 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 multiple sessions. For global sessions, use the imap_copy function, which leaves out the 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.

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: