JMAP
JMAP (JSON Meta Application Protocol) is a modern open standard for email clients, designed as a replacement for IMAP and SMTP. Published by the IETF (RFC 8620), it uses JSON over HTTP instead of persistent TCP connections, making it more efficient for mobile and web clients.
How It Works
JMAP is stateless — clients make HTTP requests containing batched JSON method calls. A session object (fetched on auth) provides server capabilities and endpoints. State tokens allow delta sync: clients only download what changed since their last known state.
Request format
{
"using": ["urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail"],
"methodCalls": [
[
"Email/query",
{
"filter": { "inMailbox": "mailboxId123" },
"sort": [{ "property": "receivedAt", "isAscending": false }],
"limit": 20
},
"req1"
]
]
}Response format
{
"methodResponses": [
[
"Email/queryResponse",
{
"queryState": "state42",
"canCalculateChanges": true,
"ids": ["email1", "email2"],
"total": 150
},
"req1"
]
]
}Key Concepts
- Batching — multiple operations (create, update, destroy) in a single request
- Delta sync —
*/changesand*/queryChangesmethods fetch only modifications since last state - Blobs — attachments are referenced by blob ID rather than inlined, reducing bandwidth
- Threads — emails are grouped into conversations server-side
- Push — native push notifications via EventSource or WebPush (no polling needed)
vs IMAP
| IMAP | JMAP | |
|---|---|---|
| Transport | Persistent TCP | Stateless HTTP |
| Format | Text commands | JSON |
| Batch ops | One command per action | Multiple ops per request |
| Push | No | Yes (EventSource / WebPush) |
| Scope | Email only | Email, contacts, calendars (extensible) |
Implementations
- Stalwart — Rust mail server with full JMAP support
- Fastmail — production implementation, original driving force behind the spec
- Cyrus IMAP — open-source reference implementation
- Thunderbird — client-side support