Search code examples
wso2wso2-enterprise-integratorwso2-cep

Additional business logic to send an email in WSO2 DAS flow


I'm developing a CEP application prototype using WSO2 DAS. As a result of my flow, I have a final event stream (attr.: email address, subject, text,...) which I want to send by mail to the address from the attribute of current event. But using WSO2 DAS I can send only simple letter to the fix address list.

I've started to read WSO2 EI documentation. I suppose, I will be able to use HTTP publisher in WSO2 DAS to send request to WSO2 EI and develop additional logic there.

Is it right way for my case?


Solution

  • Alex,

    In DAS email publisher's 'to email address' and subject are treated as dynamic fields which means you can injects values from event to those fields. To do that you can use double curly braces. Ex:

    Subject = {{subject}}

    https://docs.wso2.com/display/DAS310/Email+Event+Publisher

    Hope this answers your question.