Internet Messaging Functions (IMAP) > Alphabetical List of Functions > imap_store

imap_store

Example: imap_store Internet Messaging Functions (IMAP)

Alters messages in a mailbox.

int imap_store( char *transaction, char *method, char *message, char *action, ENDITEM, LAST );
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 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 global sessions. For multiple sessions, use the imap_store_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.