I have a script that is using the following script:
MailApp.sendEmail(row.shiftManager, "Holiday Approval Request", "", {htmlBody: message}); row.state = STATE_PENDING;
Howeverm I would like to also send the same mail to row.shiftSupervisor
, this is probably something really simple that I've overlooked, but I figured someone here would know straight away what it was.
Cheers for your help :)
Edit - I tried to use:
MailApp.sendEmail(row.shiftManager, row.shiftSupervisor, "Holiday Approval Request", "", {htmlBody: message}); row.state = STATE_PENDING;
But no joy.
Edit 2 - I got it working with:
MailApp.sendEmail(row.shiftManager, "Holiday Approval Request", "", {htmlBody: message}); MailApp.sendEmail(row.shiftSupervisor, "Holiday Approval Request", "", {htmlBody: message}); row.state = STATE_PENDING;
Not the most graceful looking piece of code, but it does the job...
Edit 3 - After looking at Sandy's solution, I figured it was formatting. Sandy' solution works fine, but caused conflicts with some other parts of my script. So my solution was:
MailApp.sendEmail(row.shiftManager + "," + row.shiftSupervisor, "Holiday Approval Request", "", {htmlBody: message});