1"use strict";(globalThis.webpackChunkemailengine_temp=globalThis.webpackChunkemailengine_temp||[]).push([[5983],{28453(e,n,s){s.d(n,{R:()=>a,x:()=>t});var r=s(96540);const i={},d=r.createContext(i);function a(e){const n=r.useContext(d);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),r.createElement(d.Provider,{value:n},e.children)}},53309(e,n,s){s.r(n),s.d(n,{assets:()=>h,contentTitle:()=>t,default:()=>l,frontMatter:()=>a,metadata:()=>r,toc:()=>o});const r=JSON.parse('{"id":"sending/threading/index","title":"Email Threading","description":"How EmailEngine groups related messages into conversations, and where to read about thread IDs, provider support, thread search, and threaded sending","source":"@site/docs/sending/threading/index.md","sourceDirName":"sending/threading","slug":"/sending/threading/","permalink":"/docs/sending/threading/","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":1,"frontMatter":{"title":"Email Threading","sidebar_position":1,"description":"How EmailEngine groups related messages into conversations, and where to read about thread IDs, provider support, thread search, and threaded sending"},"sidebar":"docsSidebar","previous":{"title":"Mail Merge","permalink":"/docs/sending/mail-merge"},"next":{"title":"Threading Overview","permalink":"/docs/sending/threading/overview"}}');var i=s(74848),d=s(28453);const a={title:"Email Threading",sidebar_position:1,description:"How EmailEngine groups related messages into conversations, and where to read about thread IDs, provider support, thread search, and threaded sending"},t="Email Threading",h={},o=[{value:"Quick Start",id:"quick-start",level:2},{value:"Threading Documentation",id:"threading-documentation",level:2},{value:"1. Threading Overview",id:"1-threading-overview",level:3},{value:"2. Provider-Specific Threading",id:"2-provider-specific-threading",level:3},{value:"3. Searching Thread Messages",id:"3-searching-thread-messages",level:3},{value:"4. Sending Threaded Messages",id:"4-sending-threaded-messages",level:3},{value:"See Also",id:"see-also",level:2}];function c(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,d.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"email-threading",children:"Email Threading"})}),"\n",(0,i.jsxs)(n.p,{children:["Email threading groups related messages into a conversation. Mail clients decide what belongs together from the ",(0,i.jsx)(n.code,{children:"Message-ID"}),", ",(0,i.jsx)(n.code,{children:"In-Reply-To"}),", and ",(0,i.jsx)(n.code,{children:"References"})," headers, and some mail servers additionally assign a thread identifier that EmailEngine exposes as ",(0,i.jsx)(n.code,{children:"threadId"}),". This page is the entry point; the four pages under it each own one part of the subject."]}),"\n",(0,i.jsx)(n.h2,{id:"quick-start",children:"Quick Start"}),"\n",(0,i.jsxs)(n.p,{children:["Use the ",(0,i.jsx)(n.code,{children:"reference"})," field of the submit API and EmailEngine sets ",(0,i.jsx)(n.code,{children:"In-Reply-To"})," and ",(0,i.jsx)(n.code,{children:"References"})," from the referenced message:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'curl -XPOST "https://emailengine.example.com/v1/account/example/submit" \\\n -H "Authorization: Bearer <token>" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "reference": {\n "message": "AAAADQAABl0",\n "action": "reply"\n },\n "html": "<p>Your reply</p>"\n }\'\n'})}),"\n",(0,i.jsxs)(n.p,{children:["That covers replies and forwards to a message EmailEngine can already see. A sequence that starts with no stored message to reference has to carry its own ",(0,i.jsx)(n.code,{children:"messageId"})," and threading headers; ",(0,i.jsx)(n.a,{href:"/docs/sending/threading/sending-threaded",children:"Sending threaded messages"})," walks through one."]}),"\n",(0,i.jsx)(n.h2,{id:"threading-documentation",children:"Threading Documentation"}),"\n",(0,i.jsxs)(n.h3,{id:"1-threading-overview",children:["1. ",(0,i.jsx)(n.a,{href:"/docs/sending/threading/overview",children:"Threading Overview"})]}),"\n",(0,i.jsx)(n.p,{children:"The fundamentals:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["What ",(0,i.jsx)(n.code,{children:"Message-ID"}),", ",(0,i.jsx)(n.code,{children:"In-Reply-To"}),", and ",(0,i.jsx)(n.code,{children:"References"})," do"]}),"\n",(0,i.jsx)(n.li,{children:"Why the subject line matters"}),"\n",(0,i.jsxs)(n.li,{children:["Which backends assign a ",(0,i.jsx)(n.code,{children:"threadId"}),", and what one looks like per provider"]}),"\n",(0,i.jsxs)(n.li,{children:["Where ",(0,i.jsx)(n.code,{children:"threadId"})," appears in API responses and webhook payloads"]}),"\n"]}),"\n",(0,i.jsxs)(n.h3,{id:"2-provider-specific-threading",children:["2. ",(0,i.jsx)(n.a,{href:"/docs/sending/threading/provider-support",children:"Provider-Specific Threading"})]}),"\n",(0,i.jsx)(n.p,{children:"How each backend behaves:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Gmail over IMAP and the Gmail API: thread IDs and the ",(0,i.jsx)(n.code,{children:"\\All"})," folder"]}),"\n",(0,i.jsxs)(n.li,{children:["Microsoft 365 over the Graph API: conversation IDs and the ",(0,i.jsx)(n.code,{children:"\\All"})," folder"]}),"\n",(0,i.jsx)(n.li,{children:"Microsoft 365 over IMAP: no thread IDs"}),"\n",(0,i.jsxs)(n.li,{children:["Yahoo, AOL, and other OBJECTID servers: thread IDs, but no ",(0,i.jsx)(n.code,{children:"\\All"})," folder"]}),"\n",(0,i.jsx)(n.li,{children:"Other IMAP servers: no thread IDs"}),"\n"]}),"\n",(0,i.jsxs)(n.h3,{id:"3-searching-thread-messages",children:["3. ",(0,i.jsx)(n.a,{href:"/docs/sending/threading/searching-threads",children:"Searching Thread Me
1ssages"})]}),"\n",(0,i.jsx)(n.p,{children:"Retrieving every message in a conversation:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["One search against ",(0,i.jsx)(n.code,{children:"\\All"})," where the backend has it"]}),"\n",(0,i.jsx)(n.li,{children:"One search per folder where it does not"}),"\n",(0,i.jsxs)(n.li,{children:["Building a thread from headers when the server assigns no ",(0,i.jsx)(n.code,{children:"threadId"})]}),"\n"]}),"\n",(0,i.jsxs)(n.h3,{id:"4-sending-threaded-messages",children:["4. ",(0,i.jsx)(n.a,{href:"/docs/sending/threading/sending-threaded",children:"Sending Threaded Messages"})]}),"\n",(0,i.jsx)(n.p,{children:"Keeping a sequence you send in one conversation:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Setting ",(0,i.jsx)(n.code,{children:"messageId"})," and extending ",(0,i.jsx)(n.code,{children:"References"})," with each message"]}),"\n",(0,i.jsxs)(n.li,{children:["When to use ",(0,i.jsx)(n.code,{children:"reference"})," instead"]}),"\n",(0,i.jsxs)(n.li,{children:["Detecting a ",(0,i.jsx)(n.code,{children:"Message-ID"})," the receiving server rewrote"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"see-also",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"/docs/sending/replies-forwards",children:"Replies and forwards"})," - Letting EmailEngine build the threading headers for you"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"/docs/receiving/searching",children:"Searching messages"})," - The search terms the thread queries are built from"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"/docs/advanced/ids-explained",children:"Message IDs"})," - What a ",(0,i.jsx)(n.code,{children:"threadId"})," is, and why it is not portable between providers"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"/docs/api-reference/messages-api",children:"Messages API"})," - Where ",(0,i.jsx)(n.code,{children:"threadId"})," appears in a message payload"]}),"\n"]})]})}function l(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.