Stores the specified mail messages on the IMAP server.
Namespace: S22.ImapAssembly: S22.Imap (in S22.Imap.dll) Version: 3.6.0.0 (3.6.0.0)
Syntax
C# |
---|
public IEnumerable<uint> StoreMessages( IEnumerable<MailMessage> messages, bool seen = false, string mailbox = null ) |
Parameters
- messages
- Type: System.Collections.Generic..::..IEnumerable<(Of <(<'MailMessage>)>)>
An enumerable collection of mail messages to store on the server.
- seen (Optional)
- Type: System..::..Boolean
Set this to true to set the \Seen flag for each message on the server.
- mailbox (Optional)
- Type: System..::..String
The mailbox the messages will be stored in. If this parameter is omitted, the value of the DefaultMailbox property is used to determine the mailbox to store the messages in.
Return Value
An enumerable collection of unique identifiers (UID) representing the stored messages on the server.Implements
IImapClient..::..StoreMessages(IEnumerable<(Of <<'(MailMessage>)>>), Boolean, String)
Remarks
A unique identifier (UID) is a 32-bit value assigned to each message which uniquely
identifies the message within the respective mailbox. No two messages in a mailbox share
the same UID.
Exceptions
Exception | Condition |
---|---|
System..::..ArgumentNullException | The messages parameter is null. |
S22.Imap..::..BadServerResponseException | The mail messages could not be stored. 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. |