Workflow: email multiple users in the same message?

var output = "this is a test message"

var usr = project.getUser("myusername"); 
usr.notify("test", output); 
var usr = project.getUser("coworkersusername"); 
usr.notify("test", output); 

This works fine.  However, I would like everyone to get the same message so they can reply-to-all to start a conversation.  I found the "sendMail" method in the documentation, but the following don't do anything:

sendMail("me@mycompany.com;coworker@mycompany.com", "test", output);

sendMail("me@mycompany.com,coworker@mycompany.com", "test", output);


But this does work:

sendMail("me@mycompany.com", "test", output);


Is it possible to include multiple recipients?
0
8 comments
Anyone?  This has to be something simple...
0
Hi Scott,

you can execute the 'sendMail()' method several times for different recipients, can't you?
0
I want everyone on the same thread.
0
Unfortunately it isn't possible.
0
Wow.  Well, thanks.
0
As workaround you can store emails in a string, split it and iterate by emails in a loop:
var emails = "me@mycompany.com;coworker@mycompany.com"; 
 
for each email in emails.split(";", opts) { 
  sendMail(email, "test", "body"); 
}
0
Yeah, that really doesn't help me.  Thanks though.
0

Please sign in to leave a comment.