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); 
prettyPrint();
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);
prettyPrint();
sendMail("me@mycompany.com,coworker@mycompany.com", "test", output);
prettyPrint();

But this does work:

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

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

you can execute the 'sendMail()' method several times for different recipients, can't you?
0
Comment actions Permalink
I want everyone on the same thread.
0
Comment actions Permalink
Unfortunately it isn't possible.
0
Comment actions Permalink
Wow.  Well, thanks.
0
Comment actions Permalink
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"); 
}
prettyPrint();
0
Comment actions Permalink
Yeah, that really doesn't help me.  Thanks though.
0

Please sign in to leave a comment.