title: Send entire column via mail from Google Spreadsheet
body: <p>I have a column (column C) in Google Spreadsheet, I want to send via email went I put an "X" in for example cell D3.</p>
  
  <p>I manage to sent an email when putting an X in D3 but I don't get the contents right, I end up receiving a different mail for each row in column C in stead of one mail containing everything from column C</p>
  
  <p>Any help would be much appreciated,</p>
  
  <p>EDIT: code added, very amateuristic I know, I don't know allot about this stuff..</p>
  
  <pre><code>var EMAIL_SENT = "EMAIL_SENT";  //text to put when mail has been sent
  
  function sendEmails2() {
    var sheet = SpreadsheetApp.getActiveSheet();
    var startRow = 1;  // First row of data to process
    var numRows = 999;   // Number of rows to process
    var dataRange = sheet.getRange(1,1, numRows, 3)
    //start on row 1 untill numRows
    //and 3 columns wide
    var data = dataRange.getValues(); 
    //get content of cell A1
    for (var i = 0; i &lt; data.length; ++i) {
      //start loop to search for data
    var row = data[i];
    var emailSent = sheet.getRange("F3").getValue(); 
    var readytosend = sheet.getRange("D3").getValue();
      if (emailSent != EMAIL_SENT &amp;&amp; readytosend == "X") {
  
        MailApp.sendEmail({
          to: "mail@mail.com",
          subject:  "test",
          body: row[0],       
          });
        //sends the email
  
        sheet.getRange(startRow + i, 3).setValue(EMAIL_SENT);
        //sets email_sent value and increases i to check next row
        SpreadsheetApp.flush();
      }
      }
  </code></pre>
  
  <p>Sam</p>