cancel
Showing results for 
Search instead for 
Did you mean: 

Send email to multiple users

sai576
Champ on-the-rise
Champ on-the-rise
In my workflow if task is not completed with in time mail goes to list of users what i specified in the fields(to,cc,bcc).But i tried with my workflow mail went to first user only in the list.i keep the mail task as asynchronous but mail did not goes to remaining users.Could you please tell me what mistake  i did ?

Thanks………

2 REPLIES 2

jbarrez
Star Contributor
Star Contributor
Hmm that is strange, because in the code the 'to' is split using the comma:

protected String[] splitAndTrim(String str) {
    if (str != null) {
      String[] splittedStrings = str.split(",");
      for (int i = 0; i < splittedStrings.length; i++) {
        splittedStrings = splittedStrings.trim();
      }
      return splittedStrings;
    }
    return null;
  }

I'll investigate and see if there is a bug and report back to you

jbarrez
Star Contributor
Star Contributor
I checked our unit tests and we have a test for multiple recipients:

<activiti:string>kermit@activiti.org, fozzie@activiti.org,mispiggy@activiti.org</activiti:string>

The unit test in question is found at org.activiti.engine.test.bpmn.mail.EmailServiceTaskTest