camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gmh <gordon...@gmail.com>
Subject how to get subject and body for mail from a properties file
Date Wed, 13 May 2015 19:58:05 GMT
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.

Mime
View raw message