简体   繁体   English

检查昨天收到的Outlook文件夹中是否有任何邮件

[英]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. 在使用python代码之前,我需要检查并确认在特定的Outlook文件夹中是否收到任何邮件。

I am able to access folder and read mails. 我能够访问文件夹并阅读邮件。 But somehow, latest mail is not read when I tried GetLast() method. 但是以某种方式,当我尝试使用GetLast()方法时不会读取最新的邮件。 I use win32com module and Outlook MAPI object to do this. 我使用win32com模块和Outlook MAPI对象来执行此操作。

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') ")

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Python:有人知道msg Outlook文件的“已接收邮件日期”参数吗? - Python: Does any one knows the Received mail date Parameter for msg Outlook file? 如何使用python获取收到的Outlook邮件的日期和时间并检查来自特定发件人的正文 - How to get date & time of received outlook mail and check body from particular sender using python Python - 根据文件夹名称将 Outlook 邮件从收件箱移动到文件夹 - Python - Moving Outlook Mail from Inbox to Folder Based on Folder Name 无法按收到日期的顺序从 outlook 中的某个文件夹中获取邮件 - Not able to get mails from a certain folder in outlook in the order of their received date 如何检查日期是否是昨天 - How to check if date is yesterday python:希望从今天收到的 outlook 邮件中保存附件并带有特定主题 - python: looking to save attachments from outlook mail received Today and with specific subject 如何在Django中检查日期是否为昨天 - How to check in Django if the date was yesterday 如何使用 Python 监视 Outlook 中的不同文件夹(非默认文件夹)是否有新邮件(然后触发事件) - How do I monitor a different folder (than the default) within Outlook for new mail (and then fire an event) with Python 如何连续监视Outlook中的新邮件和python中特定文件夹的未读邮件 - How to continuously monitor a new mail in outlook and unread mails of a specific folder in python Outlook 发件人邮件问题 - Outlook Sender mail issue
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM