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 and second parameters define either the numbers or UIDs of the first and last message, whose information is to be updated. If the values are equal, information about one message is retrieved. The SBIMAPClient.Unit.imapLastMessage constant can be passed instead of the last message number to denote the last message available in the mailbox.
Whether the are numbers or UIDs are passed in the first and second parameters, is determined by the third parameter, named UID. Setting it to true means that the UIDs are passed, while setting it to false means that the numbers are passed. The difference is that the numbers can change (eg. 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);