I have constructed a script which sends some data to addresses in cell "B" a spreadsheet sheet named "Email". Currently, it seems to only send to one email address. I want it to be able to send to multiple addresses within the same cell, which would be separated by a comma. Hopefully, this makes sense. I appreciate your help with this! Here is my current code for fetching the email address:
var email = ''; // If we don't find a match, we'll fail the send
for (var row=0; row < names.length; row++) {
if (names[row][0] == recipient) {
email = emails[row][0];
break; // end the search, we're done
}
}
MailApp.sendEmail(email,subject,message);as in the previous answer, it should do what you describe. If it's not working, please be more specific about what is wrong. - Mogsdad