camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sorin Silaghi <>
Subject camel-mail attachment is empty
Date Fri, 22 Apr 2011 07:33:29 GMT
Hi all,

           I'm trying to send an e-mail using camel-mail and I have a
problem with the attachments: they always arive empty.

           To generate the attachment I wrote a processor (code below). I
generate the stream in the route using "convertBodyTo". I also tried to do
some debugging in the camel-mail component and the exchange message seems to
be fine when it gets there. Any ideas ?

InputStream stream = (InputStream) msg.getBody();

String attachmentId = (String)
if (attachmentId == null){
    attachmentId = UtilConstants.CAMEL_FILENAME_KEY;

DataHandler handler = new DataHandler(new StreamDataSource(stream,
contentType, attachmentId));

msg.addAttachment(attachmentId, handler);

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message