title: Google Scripts - getFrom() is not a function error
body: <p>I had this working before, without an issue, however ever since I put a filter in to remove all threads with more than 1 email it is now coming up with the not a function error. I remove the filter and it still comes up with the error, unsure what has caused this to completely break on me</p>
  <pre><code>    function extractEmails() {
    var htmlBody = getEmailHtml();
    var labelName = &quot;auto-reply-incoming&quot;;
    // get all email threads that match label
    var receivedSearchQuery = &quot;label:&quot;+labelName+&quot; -is:sent&quot;;
    var threads = GmailApp.search(receivedSearchQuery, 0, 500);
      threads.forEach ((t, i) =&gt; {
        let messages = t.getMessages();
        let name = messages.getFrom();
        let messageCount = t.getMessageCount();
        if (messageCount &gt; 1) {
          label.removeFromThread(t);
        }
        if (messageCount &lt;= 1) {
          message.reply(&quot;Hi &quot; +name+&quot; \n&quot; + &quot;insert text here&quot;);
        }
      });
  };
  </code></pre>