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

IMessageStore Interface

An interface for retreiving messages from a message store such as IMAP.

Syntax

public interface IMessageStore : IMessageService, IDisposable

Remarks

Implemented by MailKit.Net.Imap.ImapClient.

Requirements

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

Members

Public Properties

[read-only]
Inbox IFolder . Gets the Inbox folder.
[read-only]
OtherNamespaces FolderNamespaceCollection . Gets the other namespaces.
[read-only]
PersonalNamespaces FolderNamespaceCollection . Gets the personal namespaces.
[read-only]
SharedNamespaces FolderNamespaceCollection . Gets the shared namespaces.

Public Methods

GetFolder (FolderNamespace) : IFolder
Gets the folder for the specified namespace.
GetFolder (SpecialFolder) : IFolder
Gets the specified special folder.
GetFolder (string) : IFolder
Gets the folder for the specified path.
GetFolder (string, System.Threading.CancellationToken) : IFolder
Gets the folder for the specified path.

Public Events

Alert Occurs when a remote message store receives an alert message from the server.

Member Details

Alert Event

Occurs when a remote message store receives an alert message from the server.

Syntax

public event EventHandler<AlertEventArgs> Alert

Remarks

Some implementations, such as MailKit.Net.Imap.ImapClient, will emit Alert events when they receive alert messages from the server.

Requirements

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

GetFolder Method

Gets the folder for the specified namespace.

Syntax

public IFolder GetFolder (FolderNamespace namespace)

Parameters

namespace
The namespace.

Returns

The folder.

Exceptions

Type Reason
ArgumentNullException namespace is null.
MailKit.FolderNotFoundException The folder could not be found.

Remarks

The main reason to get the toplevel folder in a namespace is to list its child folders.

Requirements

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

GetFolder Method

Gets the specified special folder.

Syntax

public IFolder GetFolder (SpecialFolder folder)

Parameters

folder
The type of special folder.

Returns

The folder if available; otherwise null.

Exceptions

Type Reason
ArgumentOutOfRangeException folder is out of range.

Remarks

Not all message stores support the concept of special folders, so this method may return null.

Requirements

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

GetFolder Method

Gets the folder for the specified path.

Syntax

public IFolder GetFolder (string path)

Parameters

path
The folder path.

Returns

The folder.

Exceptions

Type Reason
ArgumentNullException path is null.
MailKit.FolderNotFoundException The folder could not be found.

Remarks

Documentation for this section has not yet been entered.

Requirements

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

GetFolder Method

Gets the folder for the specified path.

Syntax

public IFolder GetFolder (string path, System.Threading.CancellationToken cancellationToken)

Parameters

path
The folder path.
cancellationToken
The cancellation token.

Returns

The folder.

Exceptions

Type Reason
ArgumentNullException path is null.
MailKit.FolderNotFoundException The folder could not be found.
OperationCanceledException The operation was canceled via the cancellation token.

Remarks

Documentation for this section has not yet been entered.

Requirements

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

Inbox Property

Gets the Inbox folder.

Syntax

public IFolder Inbox { get; }

Value

The Inbox folder.

Remarks

The Inbox folder is the default folder and is typically the folder where all new messages are delivered.

Requirements

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

OtherNamespaces Property

Gets the other namespaces.

Syntax

public FolderNamespaceCollection OtherNamespaces { get; }

Value

The other namespaces.

Remarks

The other folder namespaces contain other mailbox folders.

Requirements

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

PersonalNamespaces Property

Gets the personal namespaces.

Syntax

public FolderNamespaceCollection PersonalNamespaces { get; }

Value

The personal namespaces.

Remarks

The personal folder namespaces contain a user's personal mailbox folders.

Requirements

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

SharedNamespaces Property

Gets the shared namespaces.

Syntax

public FolderNamespaceCollection SharedNamespaces { get; }

Value

The shared namespaces.

Remarks

The shared folder namespaces contain mailbox folders that are shared with the user.

Requirements

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