camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: How to add attachement
Date Wed, 16 Jan 2008 15:25:06 GMT
On 16/01/2008, Aaron Crickenberger <aaron.crickenberger@intalgent.com> wrote:
> 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

Agreed. We might want to put an explicit API onto the Camel Message
interface to allow users to attach an attachment. Otherwise we could
just use properties on the exchange maybe

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

Mime
View raw message