I'm trying to send an specific range as a Pdf attachment or HTML Table in an email, the cells a2 will have the email and the message should be on the range C7:I25, this is what I have so far, I'm getting the error, no recipient found, can you please help me?
function correoe() {
var sheet = SpreadsheetApp.getActiveSheet();
var startRow = 2;
var numRows = 2;
var dataRange = sheet.getRange(startRow, 1, numRows, 5)
var data = dataRange.getValues();
for (i in data) {
var row = data[i];
var emailAddress = row[0];
var message = sheet.getRange ("C7:I25");
var subject = "Su Cotizacion";
MailApp.sendEmail(emailAddress, subject, message);
}
}
A2
andA3
. Do you have an email address inA3
? I believe there is no email in A3, so youremailAddress
variable is empty, hence you get the errorno Recipient found
. Please share an example of how your spreadsheet looks, to understand what you are trying to achieve. – Jack Brown