Sets the IMAP message flag attributes for the mail message with the specified unique
identifier (UID).
Namespace: S22.ImapAssembly: S22.Imap (in S22.Imap.dll) Version: 3.6.0.0 (3.6.0.0)
Syntax
C# |
---|
void SetMessageFlags( uint uid, string mailbox, params MessageFlag[] flags ) |
Parameters
- uid
- Type: System..::..UInt32
The UID of the mail message to set the flag attributes for.
- mailbox
- Type: System..::..String
The mailbox that contains the mail message. If this parameter is null, the value of the DefaultMailbox property is used to determine the mailbox to operate on.
- flags
- Type: array<S22.Imap..::..MessageFlag>[]()[][]
One or multiple message flags from the MessageFlag enumeration.
Remarks
This method replaces the current flag attributes of the message with the specified
new flags. If you wish to retain the old attributes, use the AddMessageFlags(UInt32, String, array<MessageFlag>[]()[][])
method instead.
Exceptions
Exception | Condition |
---|---|
S22.Imap..::..BadServerResponseException | The mail message flags could not be set. The message property of the exception contains the error message returned by the server. |
System..::..ObjectDisposedException | The ImapClient object has been disposed. |
System.IO..::..IOException | There was a failure writing to or reading from the network. |
S22.Imap..::..NotAuthenticatedException | The method was called in non-authenticated state, i.e. before logging in. |