function listmessages(userId,auth,cb) {     
    gmailClass.users.messages.list({   
        auth: auth,   
        userId: userId,     
    },cb);    
}
            Asked
            
        
        
            Active
            
        
            Viewed 743 times
        
    1 Answers
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
        
- 5,887
- 1
- 27
- 65
 
    