title: I accidentally sent myself 175 emails, which have been coming for two days now even though the script was aborted. How do I make them stop
body: <p>I made a mistake in my script so that instead of sending an email to myself once it is sending it hundreds of times. I ran into my quota yesterday, but once 24 hours had passed the emails are starting up again. I've already stopped the script, and I even de-authorized it from having access to the email address it's sending them from. How do I cancel all of the emails which seem to be queued up?</p>
  <p>This is the faulty script. There were 175 rows in my spreadsheet, which sends me an email for each row when a certain condition is met. I think I've already fixed the script, I just don't know how to stop the emails that keep coming even though the script itself was aborted.</p>
  <pre><code>function sendEmails() {
    var emailData = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(&quot;Subjects&quot;).getDataRange().getValues();
    var emailSubject = &quot;&quot;;
    var headerRow = emailData.shift(); //Remove the header row
    emailData.forEach(function (row) {
       var email = emailData[1];
       var  emailBody = emailData[3];
       MailApp.sendEmail(email, emailSubject, emailBody);
    });
  }
  </code></pre>