undisp
undisp

Reputation: 721

Test send email on WSO2 ESB

I want to send emails from esb to some email address.

In order to do so I uncommented this lines in the axis2.xml file:

<transportSender class="org.apache.axis2.transport.mail.MailTransportSender" name="mailto">
        <parameter name="mail.smtp.host">smtp.gmail.com</parameter>
        <parameter name="mail.smtp.port">587</parameter>
        <parameter name="mail.smtp.starttls.enable">true</parameter>
        <parameter name="mail.smtp.auth">true</parameter>
        <parameter name="mail.smtp.user">synapse.demo.0</parameter>
        <parameter name="mail.smtp.password">mymailpassword</parameter>
        <parameter name="mail.smtp.from">[email protected]</parameter>
    </transportSender>

and

<transportReceiver name="mailto" class="org.apache.axis2.transport.mail.MailTransportListener">
    </transportReceiver>

Then I added this proxy to the WSO2 ESB.

Now I want to send an email from ESB to [email protected].

I was thinking on using SoapUI to do so, so I created a new SOAP project and used the link https://localhost:9443/services/MailProxy?wsdl as the Initial WSDL.

Now this appears, but now I don't know what code I should enter in order to send the email. Can anyone help me, please?

Upvotes: 0

Views: 563

Answers (1)

susankha
susankha

Reputation: 156

You can define the receiver's mail address like below, in the address endpoint of the proxy service configuration.

<send> 
<endpoint> 
<address uri="mailto:[email protected]"/> 
</endpoint> 
</send> 

Upvotes: 1

Related Questions