---
title: "Class JmapClient"
url: "https://reference.aspose.com/email/net/aspose.email.clients.jmap/jmapclient/"
product: "Aspose.Email for .NET API Reference"
description: "Aspose.Email.Clients.Jmap.JmapClient class. Accesses JMAP mail using Aspose.Email messages and metadata"
---

## JmapClient class

Accesses JMAP mail using Aspose.Email messages and metadata.

```csharp
public sealed class JmapClient : IDisposable
```

## Constructors

| Name | Description |
| --- | --- |
| [JmapClient](jmapclient/)(JmapClientOptions) | Initializes a client. Settings are captured; the injected transport remains caller-owned. |

## Properties

| Name | Description |
| --- | --- |
| [AccessToken](../../aspose.email.clients.jmap/jmapclient/accesstoken/) { get; set; } | Gets or sets the bearer token used for subsequent requests. |
| [AccountId](../../aspose.email.clients.jmap/jmapclient/accountid/) { get; } | Gets the selected mail account after connecting. |
| [Session](../../aspose.email.clients.jmap/jmapclient/session/) { get; } | Gets the discovered session, or null before connecting. |

## Methods

| Name | Description |
| --- | --- |
| [AddMessageToFolder](../../aspose.email.clients.jmap/jmapclient/addmessagetofolder/)(string, string, CancellationToken) | Adds a message to a folder without removing its other memberships. |
| [AddMessageToFolderAsync](../../aspose.email.clients.jmap/jmapclient/addmessagetofolderasync/)(string, string, CancellationToken) | Runs AddMessageToFolder on a worker thread with cancellation of HTTP I/O. |
| [AppendMessage](../../aspose.email.clients.jmap/jmapclient/appendmessage/)(string, MailMessage, CancellationToken) | Imports a MailMessage into a folder and returns the JMAP email id. |
| [AppendMessageAsync](../../aspose.email.clients.jmap/jmapclient/appendmessageasync/)(string, MailMessage, CancellationToken) | Runs AppendMessage on a worker thread with cancellation of HTTP I/O. |
| [Connect](../../aspose.email.clients.jmap/jmapclient/connect/)(CancellationToken) | Discovers the session and selects a mail account. |
| [ConnectAsync](../../aspose.email.clients.jmap/jmapclient/connectasync/)(CancellationToken) | Runs Connect on a worker thread with cancellation of HTTP I/O. |
| [CreateFolder](../../aspose.email.clients.jmap/jmapclient/createfolder/)(string, string, CancellationToken) | Creates a folder and returns its server-assigned metadata. |
| [CreateFolderAsync](../../aspose.email.clients.jmap/jmapclient/createfolderasync/)(string, string, CancellationToken) | Runs CreateFolder on a worker thread with cancellation of HTTP I/O. |
| [DeleteFolder](../../aspose.email.clients.jmap/jmapclient/deletefolder/)(string, CancellationToken) | Deletes an empty folder. Messages are never implicitly destroyed. |
| [DeleteFolderAsync](../../aspose.email.clients.jmap/jmapclient/deletefolderasync/)(string, CancellationToken) | Runs DeleteFolder on a worker thread with cancellation of HTTP I/O. |
| [DeleteMessage](../../aspose.email.clients.jmap/jmapclient/deletemessage/)(string, CancellationToken) | Permanently destroys a message in all folders. This operation cannot be undone. |
| [DeleteMessageAsync](../../aspose.email.clients.jmap/jmapclient/deletemessageasync/)(string, CancellationToken) | Runs DeleteMessage on a worker thread with cancellation of HTTP I/O. |
| [Dispose](../../aspose.email.clients.jmap/jmapclient/dispose/)() | Releases this client. An injected transport is not disposed. |
| [FetchMessage](../../aspose.email.clients.jmap/jmapclient/fetchmessage/)(string, CancellationToken) | Downloads the full MIME message, including attachments. |
| [FetchMessageAsync](../../aspose.email.clients.jmap/jmapclient/fetchmessageasync/)(string, CancellationToken) | Runs FetchMessage on a worker thread with cancellation of HTTP I/O. |
| [ListFolders](../../aspose.email.clients.jmap/jmapclient/listfolders/)(CancellationToken) | Lists mail folders in the selected account. |
| [ListFoldersAsync](../../aspose.email.clients.jmap/jmapclient/listfoldersasync/)(CancellationToken) | Runs ListFolders on a worker thread with cancellation of HTTP I/O. |
| [ListIdentities](../../aspose.email.clients.jmap/jmapclient/listidentities/)(CancellationToken) | Lists sending identities for the selected account. |
| [ListIdentitiesAsync](../../aspose.email.clients.jmap/jmapclient/listidentitiesasync/)(CancellationToken) | Runs ListIdentities on a worker thread with cancellation of HTTP I/O. |
| [ListMessages](../../aspose.email.clients.jmap/jmapclient/listmessages/)(string, MailQuery, int, int, CancellationToken) | Lists a page of message metadata, optionally filtered with MailQuery. |
| [ListMessagesAsync](../../aspose.email.clients.jmap/jmapclient/listmessagesasync/)(string, MailQuery, int, int, CancellationToken) | Runs ListMessages on a worker thread with cancellation of HTTP I/O. |
| [MoveMessage](../../aspose.email.clients.jmap/jmapclient/movemessage/)(string, string, string, CancellationToken) | Moves between two folders while retaining all other memberships. |
| [MoveMessageAsync](../../aspose.email.clients.jmap/jmapclient/movemessageasync/)(string, string, string, CancellationToken) | Runs MoveMessage on a worker thread with cancellation of HTTP I/O. |
| [RemoveMessageFromFolder](../../aspose.email.clients.jmap/jmapclient/removemessagefromfolder/)(string, string, CancellationToken) | Removes only the specified folder membership. |
| [RemoveMessageFromFolderAsync](../../aspose.email.clients.jmap/jmapclient/removemessagefromfolderasync/)(string, string, CancellationToken) | Runs RemoveMessageFromFolder on a worker thread with cancellation of HTTP I/O. |
| [RenameFolder](../../aspose.email.clients.jmap/jmapclient/renamefolder/)(string, string, CancellationToken) | Renames a folder identified by its server id. |
| [RenameFolderAsync](../../aspose.email.clients.jmap/jmapclient/renamefolderasync/)(string, string, CancellationToken) | Runs RenameFolder on a worker thread with cancellation of HTTP I/O. |
| [Send](../../aspose.email.clients.jmap/jmapclient/send/)(MailMessage, string, string, CancellationToken) | Imports and submits a MailMessage with an explicitly selected identity and drafts folder. |
| [SendAsync](../../aspose.email.clients.jmap/jmapclient/sendasync/)(MailMessage, string, string, CancellationToken) | Runs Send on a worker thread with cancellation of HTTP I/O. |
| [SetMessageKeyword](../../aspose.email.clients.jmap/jmapclient/setmessagekeyword/)(string, string, bool, CancellationToken) | Adds or removes a keyword without replacing the other keywords. |
| [SetMessageKeywordAsync](../../aspose.email.clients.jmap/jmapclient/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

* namespace [Aspose.Email.Clients.Jmap](../../aspose.email.clients.jmap/)
* assembly [Aspose.Email](../../)


