简体   繁体   English

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

[英]Python: Does any one knows the Received mail date Parameter for msg Outlook file?

I am working to parse the msg (Outlook mail) file using python. 我正在使用python解析msg(Outlook邮件)文件。 I found number of attributes shown in to the code that I did so far, 我发现到目前为止我执行的代码中显示了许多属性,

I did following code for that, 我为此做了以下代码,

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

I would like to have Received data intead of SendOn date. 我希望收到有关SendOn日期的数据。 Does any one knows, which attribute I have to use instead of msg.SendOn? 有谁知道,我必须使用哪个属性代替msg.SendOn?

使用MailItem.ReceivedTime属性。

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

相关问题 检查昨天收到的Outlook文件夹中是否有任何邮件 - Check if there is any mail in an outlook folder received yesterday 如何使用python获取收到的Outlook邮件的日期和时间并检查来自特定发件人的正文 - How to get date & time of received outlook mail and check body from particular sender using python 用于创建Outlook .msg文件的Python脚本 - Python Script to Create Outlook .msg File 如何使用 Python 使用自身的 msg 文件名(.msg 之前的字符串)重命名 Outlook msg(.msg 文件)中的附件 - How to Rename Attachments from outlook msg (.msg files) with the msg file name it self (string before .msg) with Python 保存到Python中的.msg文件,或者发送邮件到文件系统 - Saving to .msg file in Python, or alternatively, sending mail to the file system 用 python 解析 outlook.msg 文件 - Parsing outlook .msg files with python 编辑.msg的正文 outlook Python - edit body of .msg outlook Python 如何使用Python脚本在Outlook中提取收到的电子邮件的日期? - How to extract the date of the received emails in Outlook using Python scripting? 任何人都知道为什么我的文件用 Python.exe 打开? - Anyone knows why does my file opens with Python.exe? python:希望从今天收到的 outlook 邮件中保存附件并带有特定主题 - python: looking to save attachments from outlook mail received Today and with specific subject
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM