1
votes

The get message API, Gmail API to fetch particular email, doesn't returns modified time of email. Modified time should change whenever someones reads an email. Also there is a field called 'Date' which is return as part of 'payload.headers[].name'. What does this value indicates? From my testing it stores sent/received time of emails.

Use case: WebDav clients expects modified time for legal hold policies.

Reference: https://developers.google.com/gmail/api/v1/reference/users/messages/get

1

1 Answers

0
votes

Snippet of message received from Gmail API:

{
    "historyId":"8567",
    "id":"14e87d4358bde1db",
    "internalDate":"1436797907000",
    "labelIds":["INBOX","IMPORTANT","CATEGORY_PERSONAL","UNREAD"],

The internalDate epoch timestamp is at least in Java available using message.getInternalDate method.

I am not 100% sure if this value is updated on reading the message, but I assume so since it updates the message labels by removing UNREAD label.