79383520

Date: 2025-01-24 07:19:47
Score: 0.5
Natty:
Report link

In order to send a MimeMessage using Apachae Camel AWS SES, you can just send the raw MimeMessage. There is no need to wrap it in a RawMessage nor a SendRawEmailRequest.

Sending a full SendRawEmailRequest object will be supported in newer Camel Versions (>= 4.10), as can be tracked here: https://issues.apache.org/jira/browse/CAMEL-21593.

Based upon the above stated, the working code for the example above would look like the following:

from("direct:sendEmail")
    .process(exchange -> {
        // Create MIME message with attachment
        MimeMessage mimeMessage = createMimeMessageWithAttachment();

        // Set RawMessage in the Camel body
        exchange.getIn().setBody(mimeMessage);
    })
    .to("aws2-ses://x");
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: rabitem