title: problem using MailApp.sendEmail(emailAddress, subject, message); with the new Chrome V8 runtime
body: <p>I’m running some Google Apps Script that intereracts with a Google Sheet that extracts and compares some values as the sheet is updated and sends an email if certain criteria are exceeded. It has worked solidly for over a year but recently stopped and I’ve found the problem to be with the new Chrome V8 runtime environment. If I run the legacy java environment – it works, no problem.</p>
  <p>The script looks for a condition whereby a threshold, set in the spreadsheet is exceeded – if so it should send an email. I have proven that the script identifies the threshold exceeded condition, that it can write and read values from the spreadsheet and that it can read and write the email address from a cell.</p>
  <p>It seems that the <code>MailApp.sendEmail(emailAddress, subject, message);</code> doesn't work. Any suggestions greatly appreciated.</p>
  <p>Script extract  is as follows:</p>
  <pre class="lang-js prettyprint-override"><code>var DP_THRESH1 = doc.getSheetByName(&quot;DASHBOARD&quot;).getRange(&quot;L11&quot;); //THRESHOLD
  var DP_THESHOLD1 = DP_THRESH1.getValue();
  var DP_SPREAD1 = doc.getSheetByName(&quot;DASHBOARD&quot;).getRange(&quot;H11&quot;); //CALCULATED SPREAD
  var DP_LASTSPREAD1 = DP_SPREAD1.getValue();
  if (DP_LASTSPREAD1 &lt; DP_THESHOLD1){
    // SET TO ZERO IS READY TO EMAIL STATE - THRESHOLD NOT EXCEEDED
    doc.getSheetByName(&quot;mailSheet&quot;).getRange('N2').setValue('0');
  }
  //EMAIL STATUS = 0 = READY TO EMAIL - 1 = HAVE SENT EMAIL
  var EMAIL_status = doc.getSheetByName(&quot;mailSheet&quot;).getRange(&quot;N2&quot;); 
  var EMAIL_oneshot = EMAIL_status.getValue();
        
  if ((DP_LASTSPREAD1 &gt; DP_THESHOLD1) &amp;&amp; (EMAIL_oneshot == 0)) {
    // IF THRESHOLD EXCEEDED AND NO EMAIL SENT
    doc.getSheetByName(&quot;mailSheet&quot;).getRange('N2').setValue('1'); 
    // Fetch the email address
    var emailRange =  doc.getSheetByName(&quot;mailSheet&quot;).getRange(&quot;B2&quot;);
    var emailAddress = emailRange.getValues();
    // Send Alert Email.
    var message = 'measured value is ' + DP_LASTSPREAD1;
    var subject = 'Possible Choke Alert';
    MailApp.sendEmail(emailAddress, subject, message);
  }  
  </code></pre>