Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/317.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python:有人知道msg Outlook文件的接收邮件日期参数吗?_Python_Email_Outlook_Msg - Fatal编程技术网

Python:有人知道msg Outlook文件的接收邮件日期参数吗?

Python:有人知道msg Outlook文件的接收邮件日期参数吗?,python,email,outlook,msg,Python,Email,Outlook,Msg,我正在使用python解析msg(Outlook邮件)文件。到目前为止,我在代码中找到了许多属性 我做了如下代码 import win32com.client outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI") msg = outlook.OpenSharedItem(r"C:\test_msg.msg") print msg.SenderName print msg.SenderEmail

我正在使用python解析msg(Outlook邮件)文件。到目前为止,我在代码中找到了许多属性

我做了如下代码

import win32com.client
outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI")
msg = outlook.OpenSharedItem(r"C:\test_msg.msg")
print msg.SenderName
print msg.SenderEmailAddress
print msg.SentOn
print msg.To
print msg.CC
print msg.BCC
print msg.Subject
print msg.Body

我想收到SendOn日期的数据。有人知道我必须使用哪个属性来代替msg.SendOn吗?

使用
MailItem.ReceivedTime
属性。

使用
MailItem.ReceivedTime
属性。

这是ReceivedTime。这些文件都是。谢谢,它能工作:)收到时间到了。这些文件都是。谢谢,它有效:)