Hi 

I am trying to send email with a attachment file.. I am using Spring DSL

The code which I have made for sending email is as follows

*
<setHeader headerName="CC">
            <constant>reji.math...@wipro.com</constant>
        </setHeader>

        <setHeader headerName="to">
            <constant>om_integration_lower...@outotec.com</constant>
        </setHeader>

        <setHeader headerName="from">
            <constant>no_re...@outotec.com</constant>
        </setHeader>

        <setHeader headerName="subject">
            <constant>FUSE QA ALERT : MIKHEEVSKY : ID55 - COPPER IN
CONCENTRATE</constant>
        </setHeader>

        <setBody>
            <simple> Hi This si the message from REJI!!!! Have a great day
</simple>
        </setBody>

        <setHeader headerName="contentType">
            <constant>text/plain</constant>
        </setHeader>

        <multicast>
            <to uri="smtp://smtp.td.local:25?mapMailMessage=true"/>
        </multicast>
*


I want to add the attachement  called "payload.txt"

How can I attache the file in this Camel Email Component? Can somebody help
me with this pleaseee..

I am creating the attachment using java code inside the processor component. 


                PrintWriter writer = new PrintWriter("payload.txt", "UTF-8");
                writer.println("This is the file content");
                writer.close();

If I can add this file to the the exchange form the processor itself, i
guess it should work. But I want to add to the existing exchange itself. Not
create a new exchange..



Reji



--
View this message in context: 
http://camel.465427.n5.nabble.com/Email-Attachments-Adding-to-Exchange-Attachments-tp5739863.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to