Skip to content

Gmail API date range doesn't return all the mails #17

@naveenpaul

Description

@naveenpaul

My date range is - after:2015/12/24 before:2016/3/25

but the API returns me only for the past few days and it completely misses the beginning dates. I get 51 emails.

But using the same date range in the Gmail web app, I get 225 emails.

I do have emails for those dates and they are never returned by the API. What am I missing here?

I parse the payload this way

ar s = gmail.messages(filter);

   s.on('data', function (d) {
            if(common.checkRequired(d) && common.checkRequired(d.payload) && common.checkRequired(d.payload.headers)){
                if(d.payload.headers.length > 0){
                    var headers = d.payload.headers;
                    var email = parseEmailHeader(d.id,headers);

I'm struggling to get it right from few days. Any help would be grateful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions