caelum0x 429514967c feat(receiving): multi-hop reply threading + reply on public API and MCP
Inbound MX server now captures the full forwardable header chain
(extractForwardedHeaders, reused from the outbound submission proxy) and
persists it on ReceivedEmail.headers (no migration, already Json?).
replyToReceivedEmail builds the real RFC 5322 References chain from it
instead of only the immediate message's own Message-ID, so a reply to a
reply-of-a-reply now threads correctly beyond one hop.

Also exposes reply on the two surfaces that were dashboard-only: a new
POST /emails/received/:id/reply on the public Resend-compat API, and an
MCP tool reply_to_received_email wired to it, so external SDK callers and
AI agents can reply too.

Also records two untracked planning docs (architecture, competitive/GTM
strategy) written earlier this session, and updates the build log/plan
doc with round 2 progress and the revised priority order.
2026-10-24 00:14:51 +03:00
..