Hi Claus, I tried with the CamelFileName header, but it doesn't work. It is still taking the first attachment name, also another strange thing is that the content of the attachment which I am setting in the exchange body is also not getting changed, it is also remaining same for the all next two message. I think camel is not flushing the contents of headers and body contents after message processing completed. I there a way in camel to flush out the headers and body once the processing of exchange completed.
Regards, Shadab -----Original Message----- From: Claus Ibsen [mailto:claus.ib...@gmail.com] Sent: Wednesday, May 08, 2013 11:23 AM To: users@camel.apache.org Subject: Re: file endpoint not reflecting the filename set in the header from smtp endpoint Hi The key for the header is CamelFileName eg Exchange.FILE_NAME On Tue, May 7, 2013 at 5:42 PM, Mohammad Shadab Ali <mohammad.a...@genpact.com> wrote: > Hi, > > I am using camel 2.9.0 version. > > I have a route SMTP-->File. I am downloading the attachment from the mail > setting the attachment content into the exchange body and setting the > attachment filename in header "CamelFileName". > > exchange.getIn().setHeader("CamelFileNameOnly", filename); > > I sent 3 mails with different attachment and it processed all successfully, > in output directory I am getting only one file which is of the first mail > attachment. The problem is that for 2nd and 3rd message camel file name is > not getting reflected to the file endpoint and it takes the filename of the > first message. > > I tried with not setting the filename in the SMTP endpoint then file endpoint > is generating a unique filename for each message and I am getting the desired > output(3 files). But I want to store the file with the name of the attachment > but it is not getting reflected in file component. > > Any help would be appreciated. > > > Regards, > Shadab > > ________________________________ > *** This e-mail (and any attachments), is confidential and may be > privileged. It may be read, copied and used only by intended > recipients. Unauthorized access to this e-mail (or attachments) and > disclosure or copying of its contents or any action taken in reliance > on it is unlawful. Unintended recipients must notify the sender > immediately by e-mail/phone & delete it from their system without > making any copies or disclosing it to a third person.*** > > This e-mail (and any attachments), is confidential and may be > privileged. It may be read, copied and used only by intended > recipients. Unauthorized access to this e-mail (or attachments) and > disclosure or copying of its contents or any action taken in reliance on it > is unlawful. Unintended recipients must notify the sender immediately by > e-mail/phone & delete it from their system without making any copies or > disclosing it to a third person. > -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen *** This e-mail (and any attachments), is confidential and may be privileged. It may be read, copied and used only by intended recipients. Unauthorized access to this e-mail (or attachments) and disclosure or copying of its contents or any action taken in reliance on it is unlawful. Unintended recipients must notify the sender immediately by e-mail/phone & delete it from their system without making any copies or disclosing it to a third person.*** This e-mail (and any attachments), is confidential and may be privileged. It may be read, copied and used only by intended recipients. Unauthorized access to this e-mail (or attachments) and disclosure or copying of its contents or any action taken in reliance on it is unlawful. Unintended recipients must notify the sender immediately by e-mail/phone & delete it from their system without making any copies or disclosing it to a third person.