On Tue, Jan 1, 2013 at 11:55 AM, JackMigger <j.dorfsch...@web.de> wrote: > Happy new year and thanks for the quick reply ! > > But what happens in a (simplified) case like this: > > from("ibatis:selectUnprocessedAccounts?consumer.onConsume=consumeAccount") > // returns a list of beans with partly private information > > .split( ... ) > .removeHeaders("*") > // set the message body from bean.text > ... > // set the headers to, cc, bcc from bean.email, bean.cc, etc... > ... > .to("smtp://...) > > // bcc header is also sent in the mail (?) > > // message/bean is now consumed, but any reference to the sql > consumeAccount statement (e.g. #id#) > // has gone > .to("mock:results"); > > As far as I understand, I have to filter out all but the further needed > headers (as "id"). > Might there be a way to keep all camel message headers but configure that > *only the body* is mailed ?
You can use the wire tap to spawn off a new message (sending a new exchange) where you only copy the body. See details at: http://camel.apache.org/wire-tap.html Something like .wireTap("smtp:...", false, simple("${body}")) > (I'm aware that I could always write my own processor) > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/How-to-avoid-sending-message-headers-with-mail-component-tp5724719p5724752.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- 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