Skip to content

Expose Reply-To in MessageInfo metadata - #232

Merged
odrobnik merged 2 commits into
mainfrom
agent/issue-217
Sep 8, 2026
Merged

odrobnik merged 2 commits into
mainfrom
agent/issue-217

Conversation

@odrobnik

@odrobnik odrobnik commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Resolves #217.

Adds a public, Codable MessageInfo.replyTo: [String], populated from the IMAP ENVELOPE and from a selectively fetched Reply-To header. ENVELOPE keeps precedence when both are present, matching the existing standard-header fallback.

Covered by regression tests for the ENVELOPE projection, the headerFields: ["Reply-To"] path, and MessageInfo Codable round trips.

🤖 Generated with Claude Code

@odrobnik
odrobnik merged commit 64a9a86 into main Sep 8, 2026
6 checks passed
@odrobnik
odrobnik deleted the agent/issue-217 branch September 8, 2026 05:42
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-08T05:45:54.733539Z 8bcd1c7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8bcd1c725d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

// Collect additional headers (everything except standard ones)
let standardKeys: Set<String> = [
"from", "to", "cc", "bcc", "subject", "date", "message-id",
"from", "reply-to", "to", "cc", "bcc", "subject", "date", "message-id",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve Reply-To in outbound message paths

When an EML containing Reply-To is parsed, this change removes that header from additionalFields and stores it only in replyTo, but neither EMLSerializer.writeHeaders nor Email.init(message:) consumes the new property. Consequently, parse→serialize and Message→Email workflows now silently drop Reply-To—whereas it previously survived through additionalFields—so replies to exported or resent messages may go to From instead.

Useful? React with 👍 / 👎.

uid: SwiftMail.UID? = nil,
subject: String? = nil,
from: String? = nil,
replyTo: [String] = [],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Populate Reply-To for embedded messages

For a message/rfc822 BODYSTRUCTURE whose embedded envelope contains a reply address, MessagePart.embeddedMessageInfo(from:) still constructs MessageInfo without passing envelope.reply. As a result, the new property is always empty for embedded messages even though the same ENVELOPE metadata is available and is populated for top-level messages.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose Reply-To in MessageInfo metadata

1 participant