Discuss this help topic in SecureBlackbox Forum
IMAP: Update message state on the server
Store() method lets you update the state of one or several messages on the server.
The first two parameters define the first and the last messages to be updated. They can be either message sequence numbers or message UIDs, as defined by the third parameter, UID, of the call (set it to true if you provide UIDs and to false if you provide message sequence numbers). If the indices of the first and the last messages are equal, only one message is specified. The SBIMAPClient.Unit.imapLastMessage constant can be passed instead of the last message number to denote the last message available in the mailbox.
The difference between UIDs and message sequence numbers is that the latter can change (e.g. due to deletion of the message) while UIDs are permanent at least during the session.
Operation parameter specifies, whether flags must be added (set), replaced or removed.
Flags parameter lets you specify which flags are to be changed. The flags are:
Silent parameter specifies whether the server must omit any response (when the parameter is true) or it must return the numbers of UIDs of the updated messages and new values of the flags in the last, optional, Response parameter.
Examples:
C#:
client.Store(UID, UID, true, TSBIMAPStoreFlagsOperation.imapAddFlags, SBIMAPClient.Unit.imapDeletedFlag, true, null);
Delphi:
Client.Store(UID, UID, True, imapAddFlags, [imapDeletedFlag], True, nil);