You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "oscerd (via GitHub)" <gi...@apache.org> on 2026/05/22 12:33:17 UTC

[PR] CAMEL-23591: camel-mail - align consumer-side dispatch header constant names with Camel naming convention [camel]

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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23591: camel-mail - align consumer-side dispatch header constant names with Camel naming convention [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #23478:
URL: https://github.com/apache/camel/pull/23478#issuecomment-4519037457

   :star2: Thank you for your contribution to the Apache Camel project! :star2:
     :robot: CI automation will test this PR automatically.
   
     :camel: Apache Camel Committers, please review the following items:
   
     * First-time contributors **require MANUAL approval** for the GitHub Actions to run
     * You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot although they are normally detected and executed by CI.
     * You can label PRs using `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR.
     * Build and test logs are available in the summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary.
     
     :warning: Be careful when sharing logs. Review their contents before sharing them publicly.


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23591: camel-mail - align consumer-side dispatch header constant names with Camel naming convention [camel]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd merged PR #23478:
URL: https://github.com/apache/camel/pull/23478


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23591: camel-mail - align consumer-side dispatch header constant names with Camel naming convention [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #23478:
URL: https://github.com/apache/camel/pull/23478#issuecomment-4519180391

   <!-- ci-tested-modules -->
   :test_tube: **CI tested the following changed modules:**
   
   - `catalog/camel-catalog`
   - `components/camel-mail`
   - `docs`
   - `dsl/camel-endpointdsl`
   
   <details><summary>All tested modules (11 modules)</summary>
   
   - Camel :: Catalog :: Camel Catalog
   - Camel :: Endpoint DSL
   - Camel :: JBang :: MCP
   - Camel :: JBang :: Plugin :: Route Parser
   - Camel :: JBang :: Plugin :: TUI
   - Camel :: JBang :: Plugin :: Validate
   - Camel :: Launcher :: Container
   - Camel :: Mail
   - Camel :: Mail :: Microsoft OAuth
   - Camel :: YAML DSL :: Validator
   - Camel :: YAML DSL :: Validator Maven Plugin
   
   </details>
   
   ---
   :gear: [View full build and test results](https://github.com/apache/camel/actions/runs/26287993415)


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org