I'm using Camel 2.9.x for integration purposes in our current project. One of the routes consists of two endpoints - file polling endpoint and smtp mail endpoint. Files produced by the first endpoint must be sent through smtp endpoint as attachments.
For Camel configuration we're using Spring DSL (this actually is a requirement). Spring version is 3.1.1. Unfortunately, I've found only java dsl examples and documentation of attaching a file to a e-mail message in camel routes.
<endpoint uri="file:///path/to" id="file-source"/>
<endpoint uri="smtp://mail.example.com:25/[email protected]&password=secret&[email protected]" id="mail-dest"/>
<route id="simplified-for-readability">
<from ref="file-source"/>
<to ref="mail-dest"/>
</route>
This config sends files as plain/text body, not as attachments (even binary files). Is there a way to send files as attachments without using Java dsl?