oscerd opened a new pull request, #23536:
URL: https://github.com/apache/camel/pull/23536

   Backports #23478 to `camel-4.18.x`.
   
   Cherry-pick of merge commit `a04605ea8b8` with one adaptation: the original
   PR'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.adoc` instead (as a new
   `=== camel-mail - potential breaking change` section, separate from and
   following the existing `=== camel-mail` section that was added by CAMEL-23522
   for the `mail.smtp.*` JavaMail session-property hardening).
   
   ## Summary
   
   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>`. These sat outside the
   `Camel` namespace and were therefore not filtered by the default
   `HeaderFilterStrategy`.
   
   | Constant | Previous value | New value |
   |----------|----------------|-----------|
   | `MailConstants.MAIL_COPY_TO` | `copyTo` | `CamelMailCopyTo` |
   | `MailConstants.MAIL_MOVE_TO` | `moveTo` | `CamelMailMoveTo` |
   | `MailConstants.MAIL_DELETE` | `delete` | `CamelMailDelete` |
   
   ## Intentionally left unchanged
   
   - **RFC 5322 message headers** (`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; renaming
     would break mail interoperability.
   - The equally-named **`copyTo` / `moveTo` endpoint URI options** on the mail
     consumer are config properties, distinct from the Exchange headers, and are
     unchanged.
   
   DSL accessor renames: `copyTo()` → `mailCopyTo()`,
   `moveTo()` → `mailMoveTo()`, `delete()` → `mailDelete()`.
   
   ## Test plan
   
   - [x] `mvn test` in `components/camel-mail` on the 4.18.x branch — 218 tests
         pass (4 skipped)
   - [x] Cherry-pick applied cleanly except for the 4_21 → 4_18 guide-file
         rename described above
   - [x] Upgrade-guide entry added under
         `=== camel-mail - potential breaking change` in
         `camel-4x-upgrade-guide-4_18.adoc`, distinct from the existing
         CAMEL-23522 `=== camel-mail` section
   
   Tracker: CAMEL-23577
   
   _Reported by Claude Code on behalf of Andrea Cosentino_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to