C# Class MailKit.MailSpool

An abstract mail spool implementation.
An abstract mail spool implementation.
Inheritance: MailService, IMailSpool
Afficher le fichier Open project: jstedfast/MailKit

Méthodes publiques

Méthode Description
DeleteAllMessages ( CancellationToken cancellationToken = default(CancellationToken) ) : void

Mark all messages for deletion.

Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see IMailService.Disconnect(bool, CancellationToken)).

DeleteAllMessagesAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task

Asynchronously mark all messages for deletion.

Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see IMailService.Disconnect(bool, CancellationToken)).

DeleteMessage ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : void

Mark the specified message for deletion.

Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see MailService.Disconnect(bool, CancellationToken)).

DeleteMessageAsync ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Asynchronously mark the specified message for deletion.

Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see MailService.Disconnect(bool, CancellationToken)).

DeleteMessages ( IList indexes, CancellationToken cancellationToken = default(CancellationToken) ) : void

Mark the specified messages for deletion.

Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see MailService.Disconnect(bool, CancellationToken)).

DeleteMessages ( int startIndex, int count, CancellationToken cancellationToken = default(CancellationToken) ) : void

Mark the specified range of messages for deletion.

Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see MailService.Disconnect(bool, CancellationToken)).

DeleteMessagesAsync ( IList indexes, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Asynchronously mark the specified messages for deletion.

Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see MailService.Disconnect(bool, CancellationToken)).

DeleteMessagesAsync ( int startIndex, int count, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Asynchronously mark the specified range of messages for deletion.

Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see MailService.Disconnect(bool, CancellationToken)).

GetEnumerator ( ) : IEnumerator

Gets an enumerator for the messages in the folder.

Gets an enumerator for the messages in the folder.

GetMessage ( int index, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : MimeMessage

Get the message at the specified index.

Gets the message at the specified index.

GetMessageAsync ( int index, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task

Asynchronously get the message at the specified index.

Asynchronously gets the message at the specified index.

GetMessageHeaders ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : HeaderList

Get the headers for the specified message.

Gets the headers for the specified message.

GetMessageHeaders ( IList indexes, CancellationToken cancellationToken = default(CancellationToken) ) : IList

Get the headers for the specified messages.

Gets the headers for the specified messages.

GetMessageHeaders ( int startIndex, int count, CancellationToken cancellationToken = default(CancellationToken) ) : IList

Get the headers of the messages within the specified range.

Gets the headers of the messages within the specified range.

GetMessageHeadersAsync ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Asynchronously get the headers for the specified message.

Asynchronously gets the headers for the specified message.

GetMessageHeadersAsync ( IList indexes, CancellationToken cancellationToken = default(CancellationToken) ) : Task>

Asynchronously get the headers for the specified messages.

Asynchronously gets the headers for the specified messages.

GetMessageHeadersAsync ( int startIndex, int count, CancellationToken cancellationToken = default(CancellationToken) ) : Task>

Get the headers of the messages within the specified range.

Gets the headers of the messages within the specified range.

GetMessageSize ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : int

Get the size of the specified message, in bytes.

Gets the size of the specified message, in bytes.

GetMessageSizeAsync ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Asynchronously get the size of the specified message, in bytes.

Asynchronously gets the size of the specified message, in bytes.

GetMessageSizes ( CancellationToken cancellationToken = default(CancellationToken) ) : IList

Get the sizes for all available messages, in bytes.

Gets the sizes for all available messages, in bytes.

GetMessageSizesAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task>

Asynchronously get the sizes for all available messages, in bytes.

Asynchronously gets the sizes for all available messages, in bytes.

GetMessageUid ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : string

Get the UID of the message at the specified index.

Not all servers support UIDs, so you should first check the SupportsUids property.

GetMessageUidAsync ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Asynchronously get the UID of the message at the specified index.

Not all servers support UIDs, so you should first check the SupportsUids property.

GetMessageUids ( CancellationToken cancellationToken = default(CancellationToken) ) : IList

Get the full list of available message UIDs.

Not all servers support UIDs, so you should first check the SupportsUids property.

GetMessageUidsAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task>

Get the full list of available message UIDs.

Not all servers support UIDs, so you should first check the SupportsUids property.

GetMessages ( IList indexes, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : IList

Get the messages at the specified indexes.

Get the messages at the specified indexes.

GetMessages ( int startIndex, int count, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : IList

Get the messages within the specified range.

Gets the messages within the specified range.

GetMessagesAsync ( IList indexes, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task>

Asynchronously get the messages at the specified indexes.

Asynchronously get the messages at the specified indexes.

GetMessagesAsync ( int startIndex, int count, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task>

Asynchronously get the messages within the specified range.

Asynchronously gets the messages within the specified range.

GetStream ( int index, bool headersOnly = false, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : System.Stream

Get the message or header stream at the specified index.

Gets the message or header stream at the specified index.

GetStreamAsync ( int index, bool headersOnly = false, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task

Asynchronously get the message or header stream at the specified index.

Asynchronously gets the message or header stream at the specified index.

GetStreams ( IList indexes, bool headersOnly = false, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : IList

Get the message or header streams at the specified indexes.

Get the message or header streams at the specified indexes.

If the mail server supports pipelining, this method will likely be more efficient than using GetStream(int,bool,CancellationToken,ITransferProgress) for each message because it will batch the commands to reduce latency.

GetStreams ( int startIndex, int count, bool headersOnly = false, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : IList

Get the message or header streams within the specified range.

Gets the message or header streams within the specified range.

If the mail server supports pipelining, this method will likely be more efficient than using GetStream(int,bool,CancellationToken,ITransferProgress) for each message because it will batch the commands to reduce latency.

GetStreamsAsync ( IList indexes, bool headersOnly = false, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task>

Asynchronously get the message or header streams at the specified indexes.

Asynchronously get the message or header streams at the specified indexes.

GetStreamsAsync ( int startIndex, int count, bool headersOnly = false, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task>

Asynchronously get the message or header streams within the specified range.

Asynchronously gets the message or header streams within the specified range.

Reset ( CancellationToken cancellationToken = default(CancellationToken) ) : void

Reset the state of all messages marked for deletion.

Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see IMailService.Disconnect(bool, CancellationToken)).

ResetAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task

Asynchronously reset the state of all messages marked for deletion.

Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see IMailService.Disconnect(bool, CancellationToken)).

Méthodes protégées

Méthode Description
MailSpool ( IProtocolLogger protocolLogger ) : System

Initializes a new instance of the MailKit.MailSpool class.

Initializes a new instance of the MailKit.MailSpool class.

Private Methods

Méthode Description
DeleteMessage ( string uid, CancellationToken cancellationToken = default(CancellationToken) ) : void
DeleteMessageAsync ( string uid, CancellationToken cancellationToken = default(CancellationToken) ) : Task
DeleteMessages ( IList uids, CancellationToken cancellationToken = default(CancellationToken) ) : void
DeleteMessagesAsync ( IList uids, CancellationToken cancellationToken = default(CancellationToken) ) : Task
GetMessage ( string uid, CancellationToken cancellationToken = default(CancellationToken) ) : MimeMessage
GetMessageAsync ( string uid, CancellationToken cancellationToken = default(CancellationToken) ) : Task
GetMessageCount ( CancellationToken cancellationToken = default(CancellationToken) ) : int
GetMessageCountAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task
GetMessageHeaders ( string uid, CancellationToken cancellationToken = default(CancellationToken) ) : HeaderList
GetMessageHeaders ( IList uids, CancellationToken cancellationToken = default(CancellationToken) ) : IList
GetMessageHeadersAsync ( string uid, CancellationToken cancellationToken = default(CancellationToken) ) : Task
GetMessageHeadersAsync ( IList uids, CancellationToken cancellationToken = default(CancellationToken) ) : Task>
GetMessageSize ( string uid, CancellationToken cancellationToken = default(CancellationToken) ) : int
GetMessageSizeAsync ( string uid, CancellationToken cancellationToken = default(CancellationToken) ) : Task
GetMessages ( IList uids, CancellationToken cancellationToken = default(CancellationToken) ) : IList
GetMessagesAsync ( IList uids, CancellationToken cancellationToken = default(CancellationToken) ) : Task>
IEnumerable ( ) : IEnumerator

Gets an enumerator for the messages in the folder.

Gets an enumerator for the messages in the folder.

Method Details

DeleteAllMessages() public abstract méthode

Mark all messages for deletion.
Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see IMailService.Disconnect(bool, CancellationToken)).
/// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract DeleteAllMessages ( CancellationToken cancellationToken = default(CancellationToken) ) : void
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat void

DeleteAllMessagesAsync() public méthode

Asynchronously mark all messages for deletion.
Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see IMailService.Disconnect(bool, CancellationToken)).
/// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public DeleteAllMessagesAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat Task

DeleteMessage() public abstract méthode

Mark the specified message for deletion.
Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see MailService.Disconnect(bool, CancellationToken)).
/// is not a valid message index. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract DeleteMessage ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : void
index int The index of the message.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat void

DeleteMessageAsync() public méthode

Asynchronously mark the specified message for deletion.
Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see MailService.Disconnect(bool, CancellationToken)).
/// is not a valid message index. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public DeleteMessageAsync ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : Task
index int The index of the message.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat Task

DeleteMessages() public abstract méthode

Mark the specified messages for deletion.
Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see MailService.Disconnect(bool, CancellationToken)).
/// is null. /// /// One or more of the are invalid. /// -or- /// No indexes were specified. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract DeleteMessages ( IList indexes, CancellationToken cancellationToken = default(CancellationToken) ) : void
indexes IList The indexes of the messages.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat void

DeleteMessages() public abstract méthode

Mark the specified range of messages for deletion.
Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see MailService.Disconnect(bool, CancellationToken)).
/// and do not specify /// a valid range of messages. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract DeleteMessages ( int startIndex, int count, CancellationToken cancellationToken = default(CancellationToken) ) : void
startIndex int The index of the first message to mark for deletion.
count int The number of messages to mark for deletion.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat void

DeleteMessagesAsync() public méthode

Asynchronously mark the specified messages for deletion.
Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see MailService.Disconnect(bool, CancellationToken)).
/// is null. /// /// One or more of the are invalid. /// -or- /// No indexes were specified. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public DeleteMessagesAsync ( IList indexes, CancellationToken cancellationToken = default(CancellationToken) ) : Task
indexes IList The indexes of the messages.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat Task

DeleteMessagesAsync() public méthode

Asynchronously mark the specified range of messages for deletion.
Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see MailService.Disconnect(bool, CancellationToken)).
/// and do not specify /// a valid range of messages. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public DeleteMessagesAsync ( int startIndex, int count, CancellationToken cancellationToken = default(CancellationToken) ) : Task
startIndex int The index of the first message to mark for deletion.
count int The number of messages to mark for deletion.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat Task

GetEnumerator() public abstract méthode

Gets an enumerator for the messages in the folder.
Gets an enumerator for the messages in the folder.
/// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// A POP3 command failed. /// /// A protocol error occurred. ///
public abstract GetEnumerator ( ) : IEnumerator
Résultat IEnumerator

GetMessage() public abstract méthode

Get the message at the specified index.
Gets the message at the specified index.
/// is not a valid message index. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract GetMessage ( int index, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : MimeMessage
index int The index of the message.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
Résultat MimeKit.MimeMessage

GetMessageAsync() public méthode

Asynchronously get the message at the specified index.
Asynchronously gets the message at the specified index.
/// is not a valid message index. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public GetMessageAsync ( int index, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task
index int The index of the message.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
Résultat Task

GetMessageHeaders() public abstract méthode

Get the headers for the specified message.
Gets the headers for the specified message.
/// is not a valid message index. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract GetMessageHeaders ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : HeaderList
index int The index of the message.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat HeaderList

GetMessageHeaders() public abstract méthode

Get the headers for the specified messages.
Gets the headers for the specified messages.
/// is null. /// /// One or more of the are invalid. /// -or- /// No indexes were specified. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract GetMessageHeaders ( IList indexes, CancellationToken cancellationToken = default(CancellationToken) ) : IList
indexes IList The indexes of the messages.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat IList

GetMessageHeaders() public abstract méthode

Get the headers of the messages within the specified range.
Gets the headers of the messages within the specified range.
/// and do not specify /// a valid range of messages. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract GetMessageHeaders ( int startIndex, int count, CancellationToken cancellationToken = default(CancellationToken) ) : IList
startIndex int The index of the first message to get.
count int The number of messages to get.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat IList

GetMessageHeadersAsync() public méthode

Asynchronously get the headers for the specified message.
Asynchronously gets the headers for the specified message.
/// is not a valid message index. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public GetMessageHeadersAsync ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : Task
index int The index of the message.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat Task

GetMessageHeadersAsync() public méthode

Asynchronously get the headers for the specified messages.
Asynchronously gets the headers for the specified messages.
/// is null. /// /// One or more of the are invalid. /// -or- /// No indexes were specified. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public GetMessageHeadersAsync ( IList indexes, CancellationToken cancellationToken = default(CancellationToken) ) : Task>
indexes IList The indexes of the messages.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat Task>

GetMessageHeadersAsync() public méthode

Get the headers of the messages within the specified range.
Gets the headers of the messages within the specified range.
/// and do not specify /// a valid range of messages. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public GetMessageHeadersAsync ( int startIndex, int count, CancellationToken cancellationToken = default(CancellationToken) ) : Task>
startIndex int The index of the first message to get.
count int The number of messages to get.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat Task>

GetMessageSize() public abstract méthode

Get the size of the specified message, in bytes.
Gets the size of the specified message, in bytes.
/// is not a valid message index. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract GetMessageSize ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : int
index int The index of the message.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat int

GetMessageSizeAsync() public méthode

Asynchronously get the size of the specified message, in bytes.
Asynchronously gets the size of the specified message, in bytes.
/// is not a valid message index. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public GetMessageSizeAsync ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : Task
index int The index of the message.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat Task

GetMessageSizes() public abstract méthode

Get the sizes for all available messages, in bytes.
Gets the sizes for all available messages, in bytes.
/// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract GetMessageSizes ( CancellationToken cancellationToken = default(CancellationToken) ) : IList
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat IList

GetMessageSizesAsync() public méthode

Asynchronously get the sizes for all available messages, in bytes.
Asynchronously gets the sizes for all available messages, in bytes.
/// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public GetMessageSizesAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task>
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat Task>

GetMessageUid() public abstract méthode

Get the UID of the message at the specified index.
Not all servers support UIDs, so you should first check the SupportsUids property.
/// is not a valid message index. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The mail spool does not support UIDs. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract GetMessageUid ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : string
index int The message index.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat string

GetMessageUidAsync() public méthode

Asynchronously get the UID of the message at the specified index.
Not all servers support UIDs, so you should first check the SupportsUids property.
/// is not a valid message index. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The mail spool does not support UIDs. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public GetMessageUidAsync ( int index, CancellationToken cancellationToken = default(CancellationToken) ) : Task
index int The message index.
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat Task

GetMessageUids() public abstract méthode

Get the full list of available message UIDs.
Not all servers support UIDs, so you should first check the SupportsUids property.
/// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The mail spool does not support UIDs. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract GetMessageUids ( CancellationToken cancellationToken = default(CancellationToken) ) : IList
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat IList

GetMessageUidsAsync() public méthode

Get the full list of available message UIDs.
Not all servers support UIDs, so you should first check the SupportsUids property.
/// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The mail spool does not support UIDs. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public GetMessageUidsAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task>
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat Task>

GetMessages() public abstract méthode

Get the messages at the specified indexes.
Get the messages at the specified indexes.
/// is null. /// /// One or more of the are invalid. /// -or- /// No indexes were specified. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract GetMessages ( IList indexes, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : IList
indexes IList The indexes of the messages.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
Résultat IList

GetMessages() public abstract méthode

Get the messages within the specified range.
Gets the messages within the specified range.
/// and do not specify /// a valid range of messages. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract GetMessages ( int startIndex, int count, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : IList
startIndex int The index of the first message to get.
count int The number of messages to get.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
Résultat IList

GetMessagesAsync() public méthode

Asynchronously get the messages at the specified indexes.
Asynchronously get the messages at the specified indexes.
/// is null. /// /// One or more of the are invalid. /// -or- /// No indexes were specified. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public GetMessagesAsync ( IList indexes, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task>
indexes IList The indexes of the messages.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
Résultat Task>

GetMessagesAsync() public méthode

Asynchronously get the messages within the specified range.
Asynchronously gets the messages within the specified range.
/// and do not specify /// a valid range of messages. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public GetMessagesAsync ( int startIndex, int count, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task>
startIndex int The index of the first message to get.
count int The number of messages to get.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
Résultat Task>

GetStream() public abstract méthode

Get the message or header stream at the specified index.
Gets the message or header stream at the specified index.
/// is not a valid message index. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract GetStream ( int index, bool headersOnly = false, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : System.Stream
index int The index of the message.
headersOnly bool true if only the headers should be retrieved; otherwise, false.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
Résultat System.Stream

GetStreamAsync() public méthode

Asynchronously get the message or header stream at the specified index.
Asynchronously gets the message or header stream at the specified index.
/// is not a valid message index. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public GetStreamAsync ( int index, bool headersOnly = false, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task
index int The index of the message.
headersOnly bool true if only the headers should be retrieved; otherwise, false.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
Résultat Task

GetStreams() public abstract méthode

Get the message or header streams at the specified indexes.

Get the message or header streams at the specified indexes.

If the mail server supports pipelining, this method will likely be more efficient than using GetStream(int,bool,CancellationToken,ITransferProgress) for each message because it will batch the commands to reduce latency.

/// is null. /// /// One or more of the are invalid. /// -or- /// No indexes were specified. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract GetStreams ( IList indexes, bool headersOnly = false, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : IList
indexes IList The indexes of the messages.
headersOnly bool true if only the headers should be retrieved; otherwise, false.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
Résultat IList

GetStreams() public abstract méthode

Get the message or header streams within the specified range.

Gets the message or header streams within the specified range.

If the mail server supports pipelining, this method will likely be more efficient than using GetStream(int,bool,CancellationToken,ITransferProgress) for each message because it will batch the commands to reduce latency.

/// and do not specify /// a valid range of messages. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract GetStreams ( int startIndex, int count, bool headersOnly = false, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : IList
startIndex int The index of the first stream to get.
count int The number of streams to get.
headersOnly bool true if only the headers should be retrieved; otherwise, false.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
Résultat IList

GetStreamsAsync() public méthode

Asynchronously get the message or header streams at the specified indexes.
Asynchronously get the message or header streams at the specified indexes.
/// is null. /// /// One or more of the are invalid. /// -or- /// No indexes were specified. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public GetStreamsAsync ( IList indexes, bool headersOnly = false, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task>
indexes IList The indexes of the messages.
headersOnly bool true if only the headers should be retrieved; otherwise, false.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
Résultat Task>

GetStreamsAsync() public méthode

Asynchronously get the message or header streams within the specified range.
Asynchronously gets the message or header streams within the specified range.
/// and do not specify /// a valid range of messages. /// /// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public GetStreamsAsync ( int startIndex, int count, bool headersOnly = false, CancellationToken cancellationToken = default(CancellationToken), ITransferProgress progress = null ) : Task>
startIndex int The index of the first stream to get.
count int The number of streams to get.
headersOnly bool true if only the headers should be retrieved; otherwise, false.
cancellationToken System.Threading.CancellationToken The cancellation token.
progress ITransferProgress The progress reporting mechanism.
Résultat Task>

MailSpool() protected méthode

Initializes a new instance of the MailKit.MailSpool class.
Initializes a new instance of the MailKit.MailSpool class.
/// is null. ///
protected MailSpool ( IProtocolLogger protocolLogger ) : System
protocolLogger IProtocolLogger The protocol logger.
Résultat System

Reset() public abstract méthode

Reset the state of all messages marked for deletion.
Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see IMailService.Disconnect(bool, CancellationToken)).
/// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public abstract Reset ( CancellationToken cancellationToken = default(CancellationToken) ) : void
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat void

ResetAsync() public méthode

Asynchronously reset the state of all messages marked for deletion.
Messages marked for deletion are not actually deleted until the session is cleanly disconnected (see IMailService.Disconnect(bool, CancellationToken)).
/// The has been disposed. /// /// The is not connected. /// /// The is not authenticated. /// /// The operation was canceled via the cancellation token. /// /// An I/O error occurred. /// /// The command failed. /// /// A protocol error occurred. ///
public ResetAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task
cancellationToken System.Threading.CancellationToken The cancellation token.
Résultat Task