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

   ## 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 values sat outside
   the `Camel` namespace and were therefore not filtered by the default
   `HeaderFilterStrategy`. This is the companion to CAMEL-23522 (the 
`mail.smtp.*`
   property hardening) and follows the convention used across the rest of the
   Camel component catalog (CAMEL-23526 `camel-cxf`, CAMEL-23532 websockets,
   CAMEL-23576 `camel-jira`, ...).
   
   | Constant | Previous value | New value |
   |----------|----------------|-----------|
   | `MailConstants.MAIL_COPY_TO` | `copyTo` | `CamelMailCopyTo` |
   | `MailConstants.MAIL_MOVE_TO` | `moveTo` | `CamelMailMoveTo` |
   | `MailConstants.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).
   
   ## 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 the corresponding email fields; renaming them 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.
   
   ## Generated artifacts
   
   - `components/camel-mail/.../{imap,imaps,pop3,pop3s,smtp,smtps}.json` + 
catalog
     mirrors (the renamed header now appears as `CamelMailCopyTo` etc., while 
the
     `copyTo`/`moveTo` URI options are unchanged)
   - `dsl/camel-endpointdsl/.../MailEndpointBuilderFactory.java` — 
`MailHeaderNameBuilder`
     accessors renamed (`copyTo()` → `mailCopyTo()`, `moveTo()` → 
`mailMoveTo()`,
     `delete()` → `mailDelete()`)
   
   ## Backports
   
   `camel-mail` exists on `camel-4.18.x` and `camel-4.14.x` with the same legacy
   values — backports apply and will be filed as follow-up PRs.
   
   ## Test plan
   
   - [x] `mvn test` in `components/camel-mail` — 218 tests pass (4 skipped)
   - [x] Module + catalog + endpointdsl built cleanly; only `camel-mail` regen
         artifacts included
   - [x] Verified the `copyTo`/`moveTo` URI options remain unchanged in the 
catalog
   - [x] Upgrade guide entry added under `=== camel-mail`
   
   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