you can use header properties for this...here is an example in Java DSL using
a producerTemplate...but it can be done in your route by setting the header
properties as well...

Map<String, Object> map = new HashMap<String, Object>();
map.put("To", "[email protected]");
map.put("From", "[email protected]");
map.put("Subject", "Camel rocks");

String body = "Hello Claus.\nYes it does.\n\nRegards James.";
template.sendBodyAndHeaders("smtp://[email protected]", body, map);

see http://camel.apache.org/mail.html for more details on this...


srimin wrote:
> 
> Hi
> 
> I have an XML DSL route defined as below
> 
> <from uri="jms:queue:FOO.BOOZE"/>
> <filter>
>     <simple>${in.header.title}  contains 'EMAIL'</simple>
>     <to uri="
> smtp://acme.com:443?password=somepwd&username=someuser?to="/>
> </filter>
> 
> JMS Message header contains the mail recepient address.
> 
> How can a pass that to smtp as an option?
> 
> rgds
> srimin
> 


-----
Ben O'Day
IT Consultant -http://benoday.blogspot.com

--
View this message in context: 
http://camel.465427.n5.nabble.com/Using-dynamic-parameter-values-in-XML-DSL-Route-tp4414073p4415090.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to