Class JmapClient

JmapClient class

Accesses JMAP mail using Aspose.Email messages and metadata.

public sealed class JmapClient : IDisposable

Constructors

NameDescription
JmapClient(JmapClientOptions)Initializes a client. Settings are captured; the injected transport remains caller-owned.

Properties

NameDescription
AccessToken { get; set; }Gets or sets the bearer token used for subsequent requests.
AccountId { get; }Gets the selected mail account after connecting.
Session { get; }Gets the discovered session, or null before connecting.

Methods

NameDescription
AddMessageToFolder(string, string, CancellationToken)Adds a message to a folder without removing its other memberships.
AddMessageToFolderAsync(string, string, CancellationToken)Runs AddMessageToFolder on a worker thread with cancellation of HTTP I/O.
AppendMessage(string, MailMessage, CancellationToken)Imports a MailMessage into a folder and returns the JMAP email id.
AppendMessageAsync(string, MailMessage, CancellationToken)Runs AppendMessage on a worker thread with cancellation of HTTP I/O.
Connect(CancellationToken)Discovers the session and selects a mail account.
ConnectAsync(CancellationToken)Runs Connect on a worker thread with cancellation of HTTP I/O.
CreateFolder(string, string, CancellationToken)Creates a folder and returns its server-assigned metadata.
CreateFolderAsync(string, string, CancellationToken)Runs CreateFolder on a worker thread with cancellation of HTTP I/O.
DeleteFolder(string, CancellationToken)Deletes an empty folder. Messages are never implicitly destroyed.
DeleteFolderAsync(string, CancellationToken)Runs DeleteFolder on a worker thread with cancellation of HTTP I/O.
DeleteMessage(string, CancellationToken)Permanently destroys a message in all folders. This operation cannot be undone.
DeleteMessageAsync(string, CancellationToken)Runs DeleteMessage on a worker thread with cancellation of HTTP I/O.
Dispose()Releases this client. An injected transport is not disposed.
FetchMessage(string, CancellationToken)Downloads the full MIME message, including attachments.
FetchMessageAsync(string, CancellationToken)Runs FetchMessage on a worker thread with cancellation of HTTP I/O.
ListFolders(CancellationToken)Lists mail folders in the selected account.
ListFoldersAsync(CancellationToken)Runs ListFolders on a worker thread with cancellation of HTTP I/O.
ListIdentities(CancellationToken)Lists sending identities for the selected account.
ListIdentitiesAsync(CancellationToken)Runs ListIdentities on a worker thread with cancellation of HTTP I/O.
ListMessages(string, MailQuery, int, int, CancellationToken)Lists a page of message metadata, optionally filtered with MailQuery.
ListMessagesAsync(string, MailQuery, int, int, CancellationToken)Runs ListMessages on a worker thread with cancellation of HTTP I/O.
MoveMessage(string, string, string, CancellationToken)Moves between two folders while retaining all other memberships.
MoveMessageAsync(string, string, string, CancellationToken)Runs MoveMessage on a worker thread with cancellation of HTTP I/O.
RemoveMessageFromFolder(string, string, CancellationToken)Removes only the specified folder membership.
RemoveMessageFromFolderAsync(string, string, CancellationToken)Runs RemoveMessageFromFolder on a worker thread with cancellation of HTTP I/O.
RenameFolder(string, string, CancellationToken)Renames a folder identified by its server id.
RenameFolderAsync(string, string, CancellationToken)Runs RenameFolder on a worker thread with cancellation of HTTP I/O.
Send(MailMessage, string, string, CancellationToken)Imports and submits a MailMessage with an explicitly selected identity and drafts folder.
SendAsync(MailMessage, string, string, CancellationToken)Runs Send on a worker thread with cancellation of HTTP I/O.
SetMessageKeyword(string, string, bool, CancellationToken)Adds or removes a keyword without replacing the other keywords.
SetMessageKeywordAsync(string, string, bool, CancellationToken)Runs SetMessageKeyword on a worker thread with cancellation of HTTP I/O.

Remarks

Instances are intended for sequential use. Create separate clients for concurrent operations. Message blobs are buffered in memory. The client never retries mutations automatically.

See Also