camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: How to avoid sending message headers with mail component ?
Date Mon, 31 Dec 2012 12:12:00 GMT
Richard that was a good answer.

I added this as a FAQ as its a general question how to remove some/all headers
https://cwiki.apache.org/confluence/display/CAMEL/How+to+avoid+sending+some+or+all+message+headers

On Sat, Dec 29, 2012 at 8:52 PM, Richard Kettelerij
<richardkettelerij@gmail.com> wrote:
> This is a gotcha more people encounter. However it's very easy to solve. To
> remove all headers use a wildcard expression:
>
> from(...).removeHeaders("*").to("smtp://....")
>
> Similarly to remove all headers except some of your own (myheader1 and
> myheader2) use a wildcard with a vararg:
>
> from(...).removeHeaders("*", "myheader1", "myheader).to("smtp://....")
>
> Again to remove only Camel headers but no other transport headers:
>
> from(...).removeHeaders("Camel*").to("smtp://....")
>
> I think in your case removeHeaders("*") will suffice.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message