camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: Howto get an SMTP Endpoint to dynamically send to a Header Value
Date Mon, 04 Feb 2008 13:41:43 GMT
On 03/02/2008, Er1c <> wrote:
> I'm trying to figure out an easy way to use Spring XML (well anything really)
> to specify the delivery address of an SMTP endpoint from a header
> This is how I have the "generic" SMTP delivery:
>     <route>
>       <from uri="activemq:queue:OutgoingEmail" />
>       <to uri="smtp://localhost" />
>     </route>
> I have a header set called "deliver_to" that has the email address I'd want
> to email.
> Ideally, I would like to specify the from information (at least from an
> envelope standpoint) dyanmically as well - but I've already create standard
> evelope things like From:, Reply-To:, Subject: in the message being routed
> to the OutgoingEmail queue.

I think what you are asking for is that the output URI be dynamic made
up from some expression using the message headers / body right?

If so then this sounds like the dynamic recipient list pattern...

e.g. using EL something like


i.e. using an EL expression to create the to URI


Open Source Integration

View raw message