Hi You can use the properties-location function from simple to lookup a properties http://camel.apache.org/simple
If you are using and older Camel then the function is named properties. But its all explained on that simple docs. On Wed, May 13, 2015 at 9:58 PM, gmh <[email protected]> wrote: > Hi, > I am using Camel mail to send an email when something happens in a rabbitmq > queue. > I have all of my properties in a properties file. > I have the propertyplaceholder defined before camel context: > > <context:property-placeholder ignore-resource-not-found="true" > location="classpath:xxx" > > Below is my route: > <route id="ActionProcessor:direct:email"> > <from uri="direct:email"/> > <setHeader headerName="subject"> > <constant>Hello</constant> > </setHeader> > <setHeader headerName="contentType"> > <constant>text/plain;charset=UTF-8</constant> > </setHeader> > <setBody> > <constant>Test</constant> > </setBody> > <to ref="uri"/> > </route> > The question is how do I read the values from the below properties and > populate the body and subject? > > some.processor.consumer.camel.email.body=Test > some.processor.consumer.camel.email.subject=Hello > Thanks, > Gordon > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/how-to-get-subject-and-body-for-mail-from-a-properties-file-tp5767080.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: [email protected] Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/
