Overview
A thread (or conversation) is a group of related messages linked together by their reply chain. When you reply to an email, Jasni automatically maintains proper threading so messages appear grouped in the recipient’s email client.How Threading Works
Email threading relies on three headers:| Header | Description |
|---|---|
Message-ID | Unique identifier for each email |
In-Reply-To | References the parent email’s Message-ID |
References | Full chain of Message-IDs in the thread |
Replying to Messages
Reply to a message with proper threading:- Sets the correct
In-Reply-ToandReferencesheaders - Determines the correct recipients
- Adds
Re:prefix to the subject - Quotes the original message (if
includeOriginalis true)
Reply vs Reply All
| Option | Behavior |
|---|---|
replyAll: false | Reply only to the sender |
replyAll: true | Reply to sender and all CC recipients |
Forwarding Messages
Forward a message to new recipients:- Maintain the original thread context
- Add
Fwd:prefix to the subject - Include the original message content
Thread Structure Example
In-Reply-To, and contains the full chain in References.
Building Thread Views
To display a conversation view in your application:- Fetch messages from a folder
- Group messages by their
Referencesor rootMessage-ID - Sort within each group by date
Best Practices
Always use the reply endpoint
Always use the reply endpoint
Don’t manually construct reply headers. Use the
/reply endpoint to ensure proper threading.Preserve subject lines
Preserve subject lines
Avoid changing the subject line in replies, as some email clients use the subject for threading.
Include original context
Include original context
When replying, set
includeOriginal: true to quote the original message for context.