Moves the mail messages with the specified UIDs to the specified destination mailbox.
Namespace: S22.ImapAssembly: S22.Imap (in S22.Imap.dll) Version: 3.6.0.0 (3.6.0.0)
Syntax
C# |
---|
public void MoveMessages( IEnumerable<uint> uids, string destination, string mailbox = null ) |
Parameters
- uids
- Type: System.Collections.Generic..::..IEnumerable<(Of <(<'UInt32>)>)>
An enumerable collection of UIDs of the mail messages to move.
- destination
- Type: System..::..String
The name of the mailbox to move the messages into.
- mailbox (Optional)
- Type: System..::..String
The mailbox the messages will be moved from. If this parameter is omitted, the value of the DefaultMailbox property is used to determine the mailbox to operate on.
Implements
IImapClient..::..MoveMessages(IEnumerable<(Of <<'(UInt32>)>>), String, String)
Remarks
When moving many messages, this method is more efficient than calling
MoveMessage(UInt32, String, String) for each individual message.
Exceptions
Exception | Condition |
---|---|
System..::..ArgumentNullException | The uids parameter or the destination parameter is null. |
S22.Imap..::..BadServerResponseException | The mail messages could not be moved to the specified destination. 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. |