[backport camel-4.18.x] CAMEL-23591: camel-mail - align consumer-side dispatch header constant names with Camel naming convention#23536
Merged
oscerd merged 1 commit intoMay 27, 2026
Conversation
gnodet
approved these changes
May 26, 2026
Contributor
gnodet
left a comment
There was a problem hiding this comment.
Clean backport of the camel-mail header rename to 4.18.x — copyTo → CamelMailCopyTo, moveTo → CamelMailMoveTo, delete → CamelMailDelete. Consistent with the ongoing header-naming convention work on main. Upgrade guide entry properly included for the 4.18 line.
LGTM.
Fully automatic review from Claude Code
davsclaus
approved these changes
May 26, 2026
596901f to
830929d
Compare
…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>
830929d to
64d8d51
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports #23478 to
camel-4.18.x.Cherry-pick of merge commit
a04605ea8b8with one adaptation: the originalPR's upgrade-guide entry was added to
camel-4x-upgrade-guide-4_21.adoc,which does not exist on the 4.18.x maintenance branch. Per the project's
backport policy the same content has been added to
camel-4x-upgrade-guide-4_18.adocinstead (as a new=== camel-mail - potential breaking changesection, separate from andfollowing the existing
=== camel-mailsection that was added by CAMEL-23522for the
mail.smtp.*JavaMail session-property hardening).Summary
Renames the three consumer-side dispatch header string values in
MailConstantsthat control post-processing of a consumed mail message(
copyTo,moveTo,delete) toCamelMail<Name>. These sat outside theCamelnamespace and were therefore not filtered by the defaultHeaderFilterStrategy.MailConstants.MAIL_COPY_TOcopyToCamelMailCopyToMailConstants.MAIL_MOVE_TOmoveToCamelMailMoveToMailConstants.MAIL_DELETEdeleteCamelMailDeleteIntentionally left unchanged
MAIL_SUBJECT=Subject,MAIL_FROM=From,MAIL_TO=To,MAIL_CC=Cc,MAIL_BCC=Bcc,MAIL_REPLY_TO=Reply-To,MAIL_CONTENT_TYPE=contentType) map directly to email fields; renamingwould break mail interoperability.
copyTo/moveToendpoint URI options on the mailconsumer are config properties, distinct from the Exchange headers, and are
unchanged.
DSL accessor renames:
copyTo()→mailCopyTo(),moveTo()→mailMoveTo(),delete()→mailDelete().Test plan
mvn testincomponents/camel-mailon the 4.18.x branch — 218 testspass (4 skipped)
rename described above
=== camel-mail - potential breaking changeincamel-4x-upgrade-guide-4_18.adoc, distinct from the existingCAMEL-23522
=== camel-mailsectionTracker: CAMEL-23577
Reported by Claude Code on behalf of Andrea Cosentino