Hello,
I remember I had some issues attaching files so I added a processor that
read them directly from the file system.  For example:

        public void addEmailAttachment(Exchange ex)
        {
                String fileNameWritten =
(String)ex.getIn().getHeader("CamelFileNameProduced");
                
                ex.getIn().addAttachment("filename.zip", new DataHandler(new
FileDataSource(fileNameWritten)));
        }

The Camel Header: CamelFileNameProduced is the actual path to the file on
the file system.

Thanks,
Yogesh

--
View this message in context: 
http://camel.465427.n5.nabble.com/SMTP-sending-file-binary-as-attachment-corrupted-tp5543701p5544370.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to