Share this page

# imap_store_ex

Internet Messaging Functions (IMAP)

Alters messages in a mailbox for a specific session.

    int imap_store_ex( IMAP *ppimap, char *transaction, char *method, char *message, char *action, 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, "".
method | The store method: `Silent`
message | The message number or range of messages to delete. This only applies for the DeleteSpecificMail method. Use the following format: `"Message=`message_number | begin`:`end `"`
action | The action to perform on the message(s): `Flag` - Replace existing flags with the following flag(s). `AddFlag` - Add another flag to the existing flag(s). `RemFlag` - Remove the specified flag(s).
ENDITEM | A marker indicating the end of the message items. Repeat the message, action and ENDITEM arguments for each set of messages you need to alter.
LAST | A marker indicating the end of the argument list.

The imap_store_ex function changes the flags associated with specific messages in the current mailbox. You can change all the flags, add on to the existing flags, or remove flags.

This function is for use with multiple sessions. For global sessions, use the imap_store 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.

## Example

In the following example, the imap_store_ex function deletes messages 15, 17, and 20 through 40.

Copy code

        imap_store_ex(&imap1,"UpdateMessages",
            "Mode=SILENT",
            "Message=1", "Flags=\Deleted \Seen", ENDITEM,
            "Message=5:10", "AddFlags=\Deleted", ENDITEM,
            "Message=9", "RemFlags=\Seen", ENDITEM,
            LAST );

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