I created a function that search's my inbox in Gmail and then classifies each massage in 3 categories (name, email and body). Then it pastes it in 3 columns in a Google Sheet. But, when I run it will only paste the name and email on the first 2 columns. The problems is with the body. Even though, when i run `Logger.log(d.getPlainBody());` it shows the body text I am looking for.

The code I am using:

```
// extract emails from label in Gmail
function extractEmails() {

  // get the spreadsheet
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getActiveSheet();

  // get all email threads that match label from Sheet
  var threads = GmailApp.getInboxThreads();

  // get all the messages for the current batch of threads
  var messages = GmailApp.getMessagesForThreads(threads);

  var emailArray = [];

  // get array of email addresses
  messages.forEach(
    function(message) {
    message.forEach(
      function(d) {
      emailArray.push(d.getFrom(),d.getTo(),d.getPlainBody());
      Logger.log(d.getPlainBody());
    });
  });

  // de-duplicate the array
  var uniqueEmailArray = emailArray.filter(function(item, pos) {
    return emailArray.indexOf(item) == pos;
  });

  var cleanedEmailArray = uniqueEmailArray.map(
    function(el) {

      var matches = el.match(/\s*"?([^"]*)"?\s+<(.+)>/);

      if (matches) {
        name = matches[1]; 
        email = matches[2];
        body = matches[3];
      }

      return [name, email, body];

  });

  // clear any old data
  sheet.getRange(2,1,sheet.getLastRow(), 3).clearContent();

  // paste in new names and emails
  var printing = sheet.getRange(2 ,1,cleanedEmailArray.length, 3);
  printing.setValues(cleanedEmailArray);

}

```