On Jan 16, 2008, at 3:57 AM, borgel wrote:


Thank you Aaron!
Sending to ftp now works like a charm :-)

When sending to e-mail the file was  not attached to the mail, but the
content of the file was inserted into the body of the mail. Any thoughts on
this and how to add several attachments to the e-mail?

I'm not too familiar with camel-mail, so someone feel free to correct me here, but it doesn't look like mail attachments are currently supported. If you look at MailBinding.java in camel-mail, you'll see it populates a MimeMessage using setText(), making the assumption that a Camel Message body maps to a MIME text/plain body. I think to support attachments, it needs to populate it with a Multipart.

Where I get a little lost is how/where to populate that Multipart. The best I can come up with is checking if the Camel Message's body is a File, but that doesn't really map to a Multipart, just a Mimepart with a different MIME type.

I would probably raise an issue on JIRA for this 
http://issues.apache.org/activemq/browse/CAMEL

- aaron

Reply via email to