I have a script behind a Google spreadsheet that sends an email once certain cells of a row is completed. The script works by sending to multiple hard coded email addresses. How can I add the current user's email address as a 2nd CC? One of the CC is hard coded but the 2nd changes depending on the person updating the spreadsheet. I know how to grab the email address but how do I pass it as a variable so it actually gets CC-ed?
var currentemail = Session.getActiveUser().getEmail();
var options = {cc: 'Session.getActiveUser().getEmail(), [email protected]'};
or
var options = {cc: 'currentemail, [email protected]'};
GmailApp.sendEmail(email, subject, body, options);
Obviously these do not work :)
Many thanks in advance