4D v13.2IMAP_SetFlags |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v13.2
IMAP_SetFlags
IMAP_SetFlags
The IMAP_SetFlags command allows adding or clearing of several flags at a time, attached to the specified range of messages. IMAP protocol allows associating of a list of flags with a message. There are two types of flags: permanent or session-only. The currently defined system flags are:
An IMAP server may allow a client to define new “flags” or, on another IMAP server, may allow managing of flags other than those previously indicated. This depends on the IMAP server implementation. In this case, these special flags are called “keywords” and do not begin with “\” (see IMAP_SetCurrentMB). Note: If you set the \Deleted flag and close the current session by executing IMAP_SetCurrentMB, IMAP_CloseCurrentMB, IMAP_Delete or IMAP_Logout, the message will be “deleted” permanently. imap_ID is a long integer reference to an open connection created with IMAP_Login. startMsg is a long integer number that specifies the starting message number of the message range to be examined. The message number is a value representing the position of a message within the list of all messages in the current working mailbox. endMsg is a long integer number that specifies the ending message number of the message range to be examined. The message number is a value representing the position of a message within the list of all messages in the current working mailbox. Note: The IMAP_Delete, IMAP_MsgLstInfo, IMAP_MsgLst, IMAP_SetFlags, IMAP_GetFlags and IMAP_CopyToMB commands do not return an error if the startMsg is greater than the endMsg. In the event that this occurs, the command – in effect – does nothing. msgFlagsList may contain one or several flags. In the case of several flags, the string must be a list of flags, separated by spaces. See examples below. Only flags listed as permanentFlags, (see IMAP_SetCurrentMB), will be applied. deleteOption is an integer value which specifies whether to remove or add the flag(s) specified by the msgFlagsList parameter:
Set the \Answered and \Draft flags for the messages specified by startMsg and endMsg whether these flags were set previously or not: msgFlagsName:="\Answered \Draft" Remove the \Deleted flag for the messages specified by startMsg and endMsg whether this flag was set previously or not: msgFlagsName:="\Deleted" Set the \Deleted flag for the messages specified by startMsg and endMsg whether this flag was set previously or not: msgFlagsName:="\Deleted" Set the \Answered flag depending on the CheckBoxAnswered value: $Error:=IMAP_SetFlags(vImap_ID;$msgNum;$msgNum;"\Answered";Num(CheckBoxAnswered=0)) |
PROPERTIES
Product: 4D
INDEX HISTORY
Created: 4D Internet Commands 6.8.1 SEE ALSO
IMAP_GetFlags |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||