camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
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

On Sat, Dec 29, 2012 at 8:52 PM, Richard Kettelerij
<> 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
Twitter: davsclaus
Author of Camel in Action:

View raw message