You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by ychawla <pr...@yahoo.com> on 2010/02/24 18:47:49 UTC

Adding Mail Attachments Using Spring

Hello All,
I see on the mail page that it is possible to add mail attachments by
attaching to the exchange prior to sending:

http://camel.apache.org/mail.html

in.addAttachment("logo.jpeg", new DataHandler(new
FileDataSource("src/test/data/logo.jpeg")));

Is is possible to do this in Spring?  If not, I could just setup a bean that
adds the attachment and add that to my Spring route.

Thanks,
Yogesh
-- 
View this message in context: http://old.nabble.com/Adding-Mail-Attachments-Using-Spring-tp27714266p27714266.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Adding Mail Attachments Using Spring

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Feb 24, 2010 at 6:47 PM, ychawla <pr...@yahoo.com> wrote:
>
> Hello All,
> I see on the mail page that it is possible to add mail attachments by
> attaching to the exchange prior to sending:
>
> http://camel.apache.org/mail.html
>
> in.addAttachment("logo.jpeg", new DataHandler(new
> FileDataSource("src/test/data/logo.jpeg")));
>
> Is is possible to do this in Spring?  If not, I could just setup a bean that
> adds the attachment and add that to my Spring route.
>

No you cannot do this in Spring XML. You must use a programming
language for that.
So your idea of using a bean is good.

> Thanks,
> Yogesh
> --
> View this message in context: http://old.nabble.com/Adding-Mail-Attachments-Using-Spring-tp27714266p27714266.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus