Nalyssia Govender
Nalyssia Govender

Reputation: 11

How to send an email to multiple email addresses with the send mediator WSO2

I have created a file transfer service that sends files from one locations to another and when those files successfully transfer, it sends out an email to notify the receiver that the files are in their directory. I have it currently working with one email, however I need the email notification to be sent to multiple email addresses. I was using the address endpoint to achieve the signal email being sent out. I have implemented a couple of ways to send an email to multiple endpoints but none of them worked.

I have tried to implement the recipient list endpoint however after doing some research it seems that it currently does not work on integration studio and throws an error every time i add it to the design. I can not use the loadbalance endpoint or the failover endpoint as it sends an email to the first endpoint only and I have tried to make a copy of the default MailTo sender configuration in the <EI_HOME>/conf/axis2/axis2.xml file and change the transport sender name. For example, add mailtoWSO2 as the name.

 <transportSender name="mailtoWSO2" class="org.apache.axis2.transport.mail.MailTransportSender">

And I added the endpoint to the syntax however in which ever way I added it, it automatically gets removed. If there is a way around this, any assistance is greatly appreciated.

Upvotes: 0

Views: 205

Answers (1)

tmoasz
tmoasz

Reputation: 1331

If you have proper configuration for MailTransportSender, you use comma to separate recipients. For you case it should be something like below:

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

Upvotes: 0

Related Questions