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

   [CAMEL-26018](https://issues.apache.org/jira/browse/CAMEL-26018)
   
   The smtp producer reads the alternative body of an HTML mail from the 
`CamelMailAlternativeBody` header, but the header had no `@Metadata`. So the 
catalog did not list it, and the YAML validator of Camel CLI rejected a correct 
route that sets it:
   
   > header CamelMailAlternativeBody is not set by timer, smtp (the value would 
be null)
   
   **What changes**
   - `MailConstants.MAIL_ALTERNATIVE_BODY` has a `@Metadata` (producer, 
String), so the six mail schemes (imap, imaps, pop3, pop3s, smtp, smtps) list 
the header in the catalog.
   - The endpoint DSL has `mailAlternativeBody()`.
   
   **Tests**
   - `SourceValidatorEndpointTest.aHeaderTheProducerReadsIsKnown` sets the 
header before an smtp producer and expects no report. It fails without the fix.
   - The 274 validator, catalog doc and header tests of camel-jbang-core pass.
   
   Found while checking the body types of the mail component for CAMEL-24961 
(#28306).
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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