You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by yxzhao <yx...@stonewain.com> on 2013/01/16 20:17:15 UTC

Email with smtps not taking Placehoders for userName/password

Hi All,

We're trying to create a route to send email out. It works if we have below
configuration:

<to
uri="smtps://smtp.gmail.com?username=myUser@gmail.com&amp;password=mypass"/> 

But it does not work if the username and password are taken from a
properties file or set as headers as below.

<setHeader
headerName="emailName"><constant>myUser@gmail.com</constant></setHeader>
<to
uri="smtps://smtp.gmail.com?username=${in.header.emailName}&amp;password=mypass"/>

Is this a feature or have we done something wrong?

Thanks in advance for any help or info.



--
View this message in context: http://camel.465427.n5.nabble.com/Email-with-smtps-not-taking-Placehoders-for-userName-password-tp5725656.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Email with smtps not taking Placehoders for userName/password

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

See this FAQ
http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html


On Wed, Jan 16, 2013 at 8:17 PM, yxzhao <yx...@stonewain.com> wrote:
> Hi All,
>
> We're trying to create a route to send email out. It works if we have below
> configuration:
>
> <to
> uri="smtps://smtp.gmail.com?username=myUser@gmail.com&amp;password=mypass"/>
>
> But it does not work if the username and password are taken from a
> properties file or set as headers as below.
>
> <setHeader
> headerName="emailName"><constant>myUser@gmail.com</constant></setHeader>
> <to
> uri="smtps://smtp.gmail.com?username=${in.header.emailName}&amp;password=mypass"/>
>
> Is this a feature or have we done something wrong?
>
> Thanks in advance for any help or info.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Email-with-smtps-not-taking-Placehoders-for-userName-password-tp5725656.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen