-2
function listmessages(userId,auth,cb) {     
    gmailClass.users.messages.list({   
        auth: auth,   
        userId: userId,     
    },cb);    
}
Ish
  • 1,947
  • 1
  • 17
  • 32
Sujil
  • 1

1 Answers1

1

Try using this Users.messages. From there, you will be able to get the "internalDate"

Note for "internalDate":

The internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the Date header. However, for API-migrated mail, it can be configured by client to be based on the Date header.

then, you can use the implementation by Phrogz from the SO post.

MαπμQμαπkγVπ.0
  • 3,092
  • 1
  • 7
  • 16