title: Why does MailApp.sendEmail from Google Spreadsheet Script not Work?
body: <p>I'm <em>Trying</em> to send email using <code>MailApp.sendEmail</code> in a Google Spreadsheet Script following <em>this</em> example: <a href="https://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/" rel="nofollow noreferrer">https://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/</a> by <a href="https://stackoverflow.com/users/1027723/mhawksey">@mhawksey</a></p>
  
  <blockquote>
    <p>see: <a href="https://docs.google.com/spreadsheets/d/1mhY_hJMMPTmxq3TFAUHK0tKFhGYBpzus-dXE3U5TQdc/edit?usp=sharing" rel="nofollow noreferrer">https://docs.google.com/spreadsheets/d/1mhY_hJMMPTmxq3TFAUHK0tKFhGYBpzus-dXE3U5TQdc/edit?usp=sharing</a></p>
  </blockquote>
  
  <p>The <strong>Test web app for your latest code.</strong> function <strong><em>works</em></strong>. (<em>email is sent</em>)</p>
  
  <p><img src="https://cloud.githubusercontent.com/assets/194400/10540852/cc7f7170-7403-11e5-92e9-1d4a417dbf9b.png" alt="12 8-test-your-code"></p>
  
  <p>But when I try to trigger the <code>sendEmail()</code> via a <code>POST</code> request it does not work.</p>
  
  <p>I'm following the documentation:
  <a href="https://developers.google.com/apps-script/reference/mail/mail-app" rel="nofollow noreferrer">https://developers.google.com/apps-script/reference/mail/mail-app</a></p>
  
  <p>And yet when I trigger the <code>sendEmail()</code> function from my script, it does not send an email.</p>
  
  <p>What am I doing wrong?</p>
  
  <p>Looked at:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/17355823/mailapp-sendemail-not-working">MailApp.sendEmail Not Working?</a></li>
  <li><a href="https://stackoverflow.com/questions/15697291/google-script-mailapp-sendemail-only-works-with-my-email-address">Google script mailapp.sendEmail only works with my email address</a></li>
  </ul>
  
  <p>But I want to <em>understand</em> if I am doing something wrong...</p>
  
  <p>Full Steps and code: <a href="https://github.com/nelsonic/web-form-to-google-sheet#12-google-apps-script" rel="nofollow noreferrer">https://github.com/nelsonic/web-form-to-google-sheet#12-google-apps-script</a></p>