Skip to content

[backport camel-4.14.x] CAMEL-23591: camel-mail - align consumer-side dispatch header constant names with Camel naming convention#23564

Merged
oscerd merged 1 commit into
apache:camel-4.14.xfrom
oscerd:backport/23478-to-camel-4.14.x
May 28, 2026
Merged

[backport camel-4.14.x] CAMEL-23591: camel-mail - align consumer-side dispatch header constant names with Camel naming convention#23564
oscerd merged 1 commit into
apache:camel-4.14.xfrom
oscerd:backport/23478-to-camel-4.14.x

Conversation

@oscerd
Copy link
Copy Markdown
Contributor

@oscerd oscerd commented May 27, 2026

Backports #23478 to camel-4.14.x. Standard 4_21 → 4_14 guide-file adaptation. Three consumer-side dispatch headers renamed (copyTo / moveTo / deleteCamelMailCopyTo / CamelMailMoveTo / CamelMailDelete); RFC 5322 message headers unchanged. mvn test passes on 4.14.x.

Tracker: CAMEL-23577

Reported by Claude Code on behalf of Andrea Cosentino

@oscerd
Copy link
Copy Markdown
Contributor Author

oscerd commented May 27, 2026

Local mvn test reported 2 failures in MimeMultipartAlternativeWithLongerFilenameTest.testMultipartEmailWithRegularAttachments (Received message count. Expected: <1> but was: <0>). Re-running that test in isolation (mvn test -Dtest=MimeMultipartAlternativeWithLongerFilenameTest) passes consistently. The test exercises multipart mail attachment rendering and does not touch MAIL_COPY_TO / MAIL_MOVE_TO / MAIL_DELETE (the three constants this backport renames), so the failure is a pre-existing timing/ordering flake unrelated to this PR.

Claude Code on behalf of Andrea Cosentino

@oscerd oscerd force-pushed the backport/23478-to-camel-4.14.x branch from b337b45 to 99f9ec6 Compare May 28, 2026 08:48
…t names with Camel naming convention (apache#23478)

Renames the three consumer-side dispatch header string values in MailConstants
that control post-processing of a consumed mail message (copyTo, moveTo,
delete) to CamelMail<Name>, following the convention used across the rest of
the Camel component catalog and matching the pattern established in CAMEL-23526
(camel-cxf), CAMEL-23522 (camel-mail mail.smtp.* hardening, of which this is
the companion), CAMEL-23461 (camel-aws-bedrock), CAMEL-23532
(camel-vertx-websocket / camel-atmosphere-websocket / camel-iggy), and
CAMEL-23576 (camel-jira).

- MAIL_COPY_TO: "copyTo" -> "CamelMailCopyTo"
- MAIL_MOVE_TO: "moveTo" -> "CamelMailMoveTo"
- MAIL_DELETE: "delete" -> "CamelMailDelete"

The Java field names are unchanged so routes referencing the constants
symbolically continue to work; routes using the literal string values must be
updated (documented in the 4.21 upgrade guide).

The standard RFC 5322 message header constants (MAIL_SUBJECT=Subject,
MAIL_FROM=From, MAIL_TO=To, MAIL_CC=Cc, MAIL_BCC=Bcc, MAIL_REPLY_TO=Reply-To,
MAIL_CONTENT_TYPE=contentType) are intentionally unchanged, as they map
directly to the corresponding email fields and renaming them would break mail
interoperability. The equally-named copyTo and moveTo endpoint URI options on
the mail consumer are also unchanged; only the Exchange header values are
affected.

The generated Endpoint DSL header accessors on MailHeaderNameBuilder have been
renamed: copyTo() -> mailCopyTo(), moveTo() -> mailMoveTo(), and delete() ->
mailDelete().

All existing tests pass (they use symbolic constant references or the
unchanged URI options).

Tracker: CAMEL-23577

Reported by Claude Code on behalf of Andrea Cosentino

Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
@oscerd oscerd force-pushed the backport/23478-to-camel-4.14.x branch from 99f9ec6 to 655ac8b Compare May 28, 2026 15:02
@oscerd oscerd merged commit 6110970 into apache:camel-4.14.x May 28, 2026
1 of 3 checks passed
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.

2 participants