[python-win32] Fwd: Accessing Modification Time of an Outlook Mail in Python

venu madhav venutaurus539 at gmail.com
Tue Nov 25 07:20:04 CET 2008


Hi all,
      I am writing a small application which reads the contents of an
Outlook Mail using python. I am able to read the contents, subject
along with senders and receivers of a mail using MAPI objects. But may
I know how can I get access to the "modification time" or the
receiving time of an outlook mail in Python. For the others I have
used message object of MAPI session. Here I am pasting a sample code
to get an idea of what am I doing.


session = Dispatch("MAPI.session")
session.Logon('outlook')  # MAPI profile name
inbox = session.Inbox

print "Inbox name is:", inbox.Name
print "Number of messages:", inbox.Messages.Count

for i in range(inbox.Messages.Count):
   message = inbox.Messages.Item(i + 1)

objSender = message.Sender.Address
objRecip = message.Recipients.Item(j+1)


Now here I want to access the modification time of each mail. And if
possible if you can guide me to a place where I can get the elements
of that message object, that would be helpful.

 Please mail back for further information.
Thanks in advance,
Venu.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20081125/c9858c6c/attachment.htm>


More information about the python-win32 mailing list