Skip to content

fix(reply): prefer Reply-To over From when choosing recipients - #68

Merged
radiosilence merged 1 commit into
mainfrom
fix/reply-to-header
Aug 28, 2026
Merged

fix(reply): prefer Reply-To over From when choosing recipients#68
radiosilence merged 1 commit into
mainfrom
fix/reply-to-header

Conversation

@radiosilence

Copy link
Copy Markdown
Owner

Closes #67. Reported by Kendell (kendell@kendell.dev) by email — interaction limits blocked them filing it.

The bug

expand_reply_recipients seeded the recipient list from original.from and never consulted original.reply_to, though the Email model carries the field and EMAIL_FULL_PROPERTIES already fetches replyTo. Their reply bounced:

From:     Kilo Support <kilocode@service.usepylon.com>   # no MX/A/AAAA/CNAME
Reply-To: hi@kilo.ai                                     # the real inbox

Not cosmetic — support and transactional senders routinely brand the From domain and put the inbox that actually receives mail in Reply-To.

The fix

One helper, so the CLI's reply and GraphQL's replyToEmail were wrong together and are fixed together — the send preview included, which had been reporting the address it was about to fail to deliver to.

Reply-To replaces From, it does not join it. On a reply-all the branded address is no more deliverable than on a plain reply, so adding it alongside would just bounce a copy.

An empty Reply-To list is not a Reply-To and falls back to FromSome(vec![]) is a shape JMAP can return, and treating it as authoritative would reply to nobody.

Verifying

215 tests green. Three added next to the existing recipient tests: preference over From, reply-all using Reply-To as the sender while still appending the original To, and the fallback for both absent and empty.

Closes #67. Reported by Kendell by email.

`expand_reply_recipients` seeded the recipient list from `From` and never
looked at `Reply-To`, though the model carries the field and the fetch
already requests it. Support and transactional senders put a branded,
often undeliverable address in `From` and the real inbox in `Reply-To`,
so replies bounced.

Reply-To replaces From rather than joining it: on reply-all the branded
address is no more deliverable than on a plain reply. An empty Reply-To
list is not a Reply-To and still falls back.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016ri9XAwMqKiHLrDyTuA3np
@radiosilence radiosilence added the bug Something isn't working label Aug 28, 2026
@radiosilence
radiosilence merged commit ee4c1ce into main Aug 28, 2026
6 checks passed
@radiosilence
radiosilence deleted the fix/reply-to-header branch August 28, 2026 13:34
@radiosilence radiosilence mentioned this pull request Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

reply sends to From, ignoring Reply-To

1 participant