1

i am trying to send a message to my email for that i am using send mediator as well i setup required configurations in AXIS2 file

is it work for below proxy if not what is the way to give xpath to send mediator

<proxy xmlns="http://ws.apache.org/ns/synapse" name="mailCheck" transports="http" statistics="disable" trace="disable" startOnLoad="true">
   <target>
      <inSequence>
         <property name="Subject" value="Alert Message From WSO2 ESB - Service Down !!!" scope="transport" type="STRING"/>
         <property name="messageType" value="text/html" scope="axis2" type="STRING"/>
         <property name="ContentType" value="text/html" scope="axis2" type="STRING"/>
         <property name="Mail" value="mailto:faisal.shaik@youtility.in" scope="default" type="STRING"/>
         <log level="full">
            <property name="Mail" value="mailto:faisal.shaik@youtility.in"/>
         </log>
         <property name="OUT_ONLY" value="true" scope="default" type="STRING"/>
         <send>
            <endpoint key-expression="get-property('Mail')"/>
         </send>
      </inSequence>
      <outSequence/>
   </target>
   <description></description>
</proxy>

if need any changes pls let me know

Community
  • 1
  • 1
faisal shaik
  • 160
  • 4
  • 22

3 Answers3

1

if you want to get the email address from a property value then use the header mediator to set value of "To" to "mailto:faisal.shaik@youtility.in".

You can do that adding the following before the send mediator

<header name="To" expression="fn:concat('mailto:', get-property('Mail'))"/>
Wenod Pathirana
  • 189
  • 1
  • 6
1

You can use this:

<property name="To" expression="get-property('uri.var.to')" scope="transport"/>
<send>
    <endpoint>
        <address uri="mailto:"/>
     </endpoint>
</send>
Milad Kianmehr
  • 337
  • 2
  • 14
0
   <send>
             <address uri="mailto:xxx@yyy"/>
         </send>

key-expression also can be used..

Ratha
  • 9,434
  • 17
  • 85
  • 163
  • i know it has option with that ..but my scenario is send need not be a static it should be a dynamic mail id will be change for every time based on the client database please refer this http://stackoverflow.com/questions/17441849/is-it-possible-with-wso2esb-to-send-e-mail-using-header and http://stackoverflow.com/questions/17420179/can-we-send-multiple-mail-in-wso2esb-in-same-sequence-or-dynamically-set-a-mail – faisal shaik Jul 04 '13 at 06:48
  • how we can use key expression fro send. I couldn't find proper docs for this..what type of tool this.. – faisal shaik Jul 04 '13 at 06:54