Send email to numerous People in the Process Parameter

Hello,

I have an enquiry regarding parsing a collection of records. The idea is I want to read a number of records "Read Data" (a collection of them) and want to pass their email addresses and Names into the "Send To" field of the "Send Email" process element and their name into the merging "Email body content". 

In what way would I be able to do that?

 

Thank you

Like 1

Like

1 comments

Hello Thanos,



Unfortunately, it`s not possible to send email to many participants using "Send email" process element. You can achieve via using script task. The idea is to read collection of contacts via Read data process element and then to send email to each contact from the collection using Script task.



FYI: To read collection of elements that "Read data" retrieved from the database use the following code: 

var entities = Get<ICompositeObjectList<ICompositeObject>("ReadDataUserTask1.ResultCompositeObjectList");

The example of implementation of script task that sends email you can find in "SendEmailToCaseContactProcess", "SendMailScriptTask" element. 

Also, check the link below:

https://community.bpmonline.com/questions/email-attachments-business-pr…



Best regards,

Alex

Show all comments