I
I
Ivan Ivashin2017-07-09 19:36:58
Google Sheets
Ivan Ivashin, 2017-07-09 19:36:58

Google Sendmail problem can't formulate email?

There is a standard Google script for sending an email:

function sendEmails() {
  var sheet = SpreadsheetApp.getActiveSheet();
  var startRow = 2;  // First row of data to process
  var numRows = 2;   // Number of rows to process
  // Fetch the range of cells A2:B3
  var dataRange = sheet.getRange(startRow, 1, numRows, 2)
  // Fetch values for each row in the Range.
  var data = dataRange.getValues();
  for (i in data) {
    var row = data[i];
    var emailAddress = row[0];  // First column
    var message = row[1];       // Second column
    var subject = "Sending emails from a Spreadsheet";
    MailApp.sendEmail(emailAddress, subject, message);
  }
}

How to make it so that this miracle would send data from cells A1: C4 let's say! And what would the data be sent in one letter, otherwise it turned out that letters came in 7 pieces. at a time.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Ivashin, 2017-07-10
@inspectorpanda

Good people help, I really need to know the solution to this problem!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question