title: How to send email from a spreadsheet
body: <p>I have a spreadsheet on Google Docs with tasks for a job that we are working on at work. What I am wanting it to do is to send the whole row to the intended recipient but I can only get it to send the info from the first column after the email address. Everything has a due date on it and I would like to get it to send a reminder when it gets close to that date but I do not know how to do that.</p>
  
  <p>Any help would be greatly appreciated. 
  Here is the code I have right now:</p>
  
  <pre><code>function sendEmails() {
    var sheet = SpreadsheetApp.getActiveSheet();
    var startRow = 3;  // 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];       // Column B, Column C, Column D, Column E, Column F, Column G
      var subject = "Email Test Spreadsheet";
      MailApp.sendEmail(emailAddress, subject, message);
    }
  }
  </code></pre>