title: Data and email list in two different sheet
body: <p>I have the data in the <strong>Backend</strong> sheet and I have the email list on <strong>Subscribers</strong> sheet, but the email is not sent to the list, where did I go wrong?</p>
  <pre><code>function sendEmail(e) {
  var thisSheet = e.source.getActiveSheet();
  if (thisSheet.getName() !== 'Backend' || e.range.columnStart !== 17 || e.range.rowStart == 1 || e.value !== 'LOCAL') return;
  var body, headers = thisSheet.getRange(1, 1, 1, 6)
      .getValues()[0],
      thisRow = thisSheet.getRange(e.range.rowStart, 1, 1, 6)
      .getValues()[0],
      vehicle = thisRow[3],
      vehicle2 = thisRow[4],
      subject = &quot;⚫ Vehicle Ready &quot;+vehicle +&quot; &quot;+vehicle2
      
      var emailList = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(&quot;Subscribers&quot;).getRange(&quot;A2:A&quot;).getValues();
      
      body = &quot;&lt;i&gt;The following vehicle is ready after wash&lt;/i&gt;&lt;br&gt;&lt;br&gt;&quot;,
      i = 0;
  while (i &lt; 6) {
      body += '&lt;font style=&quot;font-size:14px;color:grey;font-family: Arial&quot;&gt;'+headers[i] +'&lt;/font&gt;'+' - &lt;b&gt;&lt;font style=&quot;font-size:14px;font-family: Arial&quot;&gt;' + thisRow[i] +'&lt;/font&gt;&lt;/b&gt;&lt;br&gt;&lt;hr width=&quot;30%&quot; align=&quot;left&quot; Color=&quot;#bfbfbf&quot; size=&quot;0.75&quot;&gt;';
      i++;
  }
  </code></pre>
  <p>MailApp.sendEmail(emailList, subject, body, {htmlBody: body, name: &quot;company&quot;});
  }enter code here</p>