View on GitHub

MailKit

MailKit: A cross-platform .NET mail-client library optimized for mobile.

Download this project as a .zip file Download this project as a tar.gz file

IMessageSpool Interface

An interface for retreiving messages from a spool.

Syntax

Remarks

Implemented by MailKit.Net.Pop3.Pop3Client.

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0

Members

Public Properties

[read-only]
SupportsUids bool . Gets whether or not the service supports referencing messages by UIDs.

Public Methods

DeleteMessage (int)
Mark the specified message for deletion.
DeleteMessage (string)
Mark the specified message for deletion.
DeleteMessage (int, System.Threading.CancellationToken)
Mark the specified message for deletion.
DeleteMessage (string, System.Threading.CancellationToken)
Mark the specified message for deletion.
GetMessage (int) : MimeKit.MimeMessage
Gets the specified message.
GetMessage (string) : MimeKit.MimeMessage
Gets the specified message.
GetMessage (int, System.Threading.CancellationToken) : MimeKit.MimeMessage
Gets the specified message.
GetMessage (string, System.Threading.CancellationToken) : MimeKit.MimeMessage
Gets the specified message.
GetMessageCount () : int
Gets the number of messages available in the message spool.
GetMessageCount (System.Threading.CancellationToken) : int
Gets the number of messages available in the message spool.
GetMessageHeaders (int) : MimeKit.HeaderList
Gets the headers for the specified message.
GetMessageHeaders (string) : MimeKit.HeaderList
Gets the headers for the specified message.
GetMessageHeaders (int, System.Threading.CancellationToken) : MimeKit.HeaderList
Gets the headers for the specified message.
GetMessageHeaders (string, System.Threading.CancellationToken) : MimeKit.HeaderList
Gets the headers for the specified message.
GetMessageSize (int) : int
Gets the size of the specified message, in bytes.
GetMessageSize (string) : int
Gets the size of the specified message, in bytes.
GetMessageSize (int, System.Threading.CancellationToken) : int
Gets the size of the specified message, in bytes.
GetMessageSize (string, System.Threading.CancellationToken) : int
Gets the size of the specified message, in bytes.
GetMessageSizes () : int[]
Gets the sizes for all available messages, in bytes.
GetMessageSizes (System.Threading.CancellationToken) : int[]
Gets the sizes for all available messages, in bytes.
GetMessageUid (int) : string
Gets the UID of the message at the specified index.
GetMessageUid (int, System.Threading.CancellationToken) : string
Gets the UID of the message at the specified index.
GetMessageUids () : string[]
Gets the full list of available message UIDs.
GetMessageUids (System.Threading.CancellationToken) : string[]
Gets the full list of available message UIDs.
Reset ()
Reset the state of all messages marked for deletion.
Reset (System.Threading.CancellationToken)
Reset the state of all messages marked for deletion.

Member Details

DeleteMessage Method

Mark the specified message for deletion.

Syntax

public void DeleteMessage (int index)

Parameters

index
The index of the message.

Remarks

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

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0

DeleteMessage Method

Mark the specified message for deletion.

Syntax

public void DeleteMessage (string uid)

Parameters

uid
The UID of the message.

Remarks

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

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0

DeleteMessage Method

Mark the specified message for deletion.

Syntax

public void DeleteMessage (int index, System.Threading.CancellationToken cancellationToken)

Parameters

index
The index of the message.
cancellationToken
A cancellation token.

Remarks

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

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0

DeleteMessage Method

Mark the specified message for deletion.

Syntax

public void DeleteMessage (string uid, System.Threading.CancellationToken cancellationToken)

Parameters

uid
The UID of the message.
cancellationToken
A cancellation token.

Remarks

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

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0

GetMessage Method

Gets the specified message.

Syntax

public MimeKit.MimeMessage GetMessage (int index)

Parameters

index
The index of the message.

Returns

The message.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0

GetMessage Method

Gets the specified message.

Syntax

public MimeKit.MimeMessage GetMessage (string uid)

Parameters

uid
The UID of the message.

Returns

The message.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0

GetMessage Method

Gets the specified message.

Syntax

public MimeKit.MimeMessage GetMessage (int index, System.Threading.CancellationToken cancellationToken)

Parameters

index
The index of the message.
cancellationToken
A cancellation token.

Returns

The message.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0

GetMessage Method

Gets the specified message.

Syntax

public MimeKit.MimeMessage GetMessage (string uid, System.Threading.CancellationToken cancellationToken)

Parameters

uid
The UID of the message.
cancellationToken
A cancellation token.

Returns

The message.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0

GetMessageCount Method

Gets the number of messages available in the message spool.

Syntax

public int GetMessageCount ()

Returns

The number of available messages.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0

GetMessageCount Method

Gets the number of messages available in the message spool.

Syntax

public int GetMessageCount (System.Threading.CancellationToken cancellationToken)

Parameters

cancellationToken
A cancellation token.

Returns

The number of available messages.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0

GetMessageHeaders Method

Gets the headers for the specified message.

Syntax

public MimeKit.HeaderList GetMessageHeaders (int index)

Parameters

index
The index of the message.

Returns

The message headers.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0

GetMessageHeaders Method

Gets the headers for the specified message.

Syntax

public MimeKit.HeaderList GetMessageHeaders (string uid)

Parameters

uid
The UID of the message.

Returns

The message headers.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0

GetMessageHeaders Method

Gets the headers for the specified message.

Syntax

public MimeKit.HeaderList GetMessageHeaders (int index, System.Threading.CancellationToken cancellationToken)

Parameters

index
The index of the message.
cancellationToken
A cancellation token.

Returns

The message headers.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0

GetMessageHeaders Method

Gets the headers for the specified message.

Syntax

public MimeKit.HeaderList GetMessageHeaders (string uid, System.Threading.CancellationToken cancellationToken)

Parameters

uid
The UID of the message.
cancellationToken
A cancellation token.

Returns

The message headers.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0

GetMessageSize Method

Gets the size of the specified message, in bytes.

Syntax

public int GetMessageSize (int index)

Parameters

index
The index of the message.

Returns

The message size, in bytes.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0

GetMessageSize Method

Gets the size of the specified message, in bytes.

Syntax

public int GetMessageSize (string uid)

Parameters

uid
The UID of the message.

Returns

The message size, in bytes.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0

GetMessageSize Method

Gets the size of the specified message, in bytes.

Syntax

public int GetMessageSize (int index, System.Threading.CancellationToken cancellationToken)

Parameters

index
The index of the message.
cancellationToken
A cancellation token.

Returns

The message size, in bytes.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0

GetMessageSize Method

Gets the size of the specified message, in bytes.

Syntax

public int GetMessageSize (string uid, System.Threading.CancellationToken cancellationToken)

Parameters

uid
The UID of the message.
cancellationToken
A cancellation token.

Returns

The message size, in bytes.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0

GetMessageSizes Method

Gets the sizes for all available messages, in bytes.

Syntax

public int[] GetMessageSizes ()

Returns

The message sizes, in bytes.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0

GetMessageSizes Method

Gets the sizes for all available messages, in bytes.

Syntax

public int[] GetMessageSizes (System.Threading.CancellationToken cancellationToken)

Parameters

cancellationToken
A cancellation token.

Returns

The message sizes, in bytes.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0

GetMessageUid Method

Gets the UID of the message at the specified index.

Syntax

public string GetMessageUid (int index)

Parameters

index
The message index.

Returns

The message UID.

Remarks

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

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0

GetMessageUid Method

Gets the UID of the message at the specified index.

Syntax

public string GetMessageUid (int index, System.Threading.CancellationToken cancellationToken)

Parameters

index
The message index.
cancellationToken
A cancellation token.

Returns

The message UID.

Remarks

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

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0

GetMessageUids Method

Gets the full list of available message UIDs.

Syntax

public string[] GetMessageUids ()

Returns

The message UIDs.

Remarks

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

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0

GetMessageUids Method

Gets the full list of available message UIDs.

Syntax

public string[] GetMessageUids (System.Threading.CancellationToken cancellationToken)

Parameters

cancellationToken
A cancellation token.

Returns

The message UIDs.

Remarks

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

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0

Reset Method

Reset the state of all messages marked for deletion.

Syntax

public void Reset ()

Remarks

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

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0

Reset Method

Reset the state of all messages marked for deletion.

Syntax

public void Reset (System.Threading.CancellationToken cancellationToken)

Parameters

cancellationToken
A cancellation token.

Remarks

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

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0

SupportsUids Property

Gets whether or not the service supports referencing messages by UIDs.

Syntax

public bool SupportsUids { get; }

Value

true if supports uids; otherwise, false.

Remarks

Not all servers support referencing messages by UID, so this property should be checked before using IMessageSpool.GetMessageUid(int, System.Threading.CancellationToken) and IMessageSpool.GetMessageUids(System.Threading.CancellationToken).

If the server does not support UIDs, then all methods that take UID arguments along with IMessageSpool.GetMessageUid(int, System.Threading.CancellationToken) and IMessageSpool.GetMessageUids(System.Threading.CancellationToken) will fail.

Requirements

Namespace: MailKit
Assembly: MailKit (in MailKit.dll)
Assembly Versions: 0.11.0.0