On 03/02/2008, Er1c <[EMAIL PROTECTED]> 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... http://activemq.apache.org/camel/recipient-list.html e.g. using EL something like from("activemq:SomeQueue").recipientList().el("smtp://[EMAIL PROTECTED]"); i.e. using an EL expression to create the to URI -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://open.iona.com
