4

I am working to parse the msg (Outlook mail) file using python. 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. Does any one knows, which attribute I have to use instead of msg.SendOn?

jaymin581
  • 165
  • 3
  • 15

1 Answers1

8

Use MailItem.ReceivedTime property.

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78