简体   繁体   中英

Check if there is any mail in an outlook folder received yesterday

I need to check and verify if there is any mail received in a specific outlook folder on the day before using python code.

I am able to access folder and read mails. But somehow, latest mail is not read when I tried GetLast() method. I use win32com module and Outlook MAPI object to do this.

Is there any way to check if there are mails received on yesterday?

使用Items.Restrict

yesterdaysItems = MAPIFolder.Items.Restrict("@SQL=(ReceivedTime < '7/21/2016') AND (ReceivedTime > '7/20/2016') ")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM