Searching emails in gmail based on time

后端 未结 2 1545
抹茶落季
抹茶落季 2021-01-14 09:39

I want a list of all yesterday\'s emails from gmail. I am trying to process it using google apps script, by writing a query on my inbox, and then using GmailApp.search. The

2条回答
  •  孤独总比滥情好
    2021-01-14 10:06

    Can you give the exact search string you are using along with how you construct the before and after dates ? You can use the Utilities.formatDate() function to format the date string to the timezone you are in.

    An alternate solution is to fetch all mails (maybe a 100 or so) and then discard all those which do not fit in the time period you are interested in.

提交回复
热议问题