Accessing Modification Time of an Outlook Mail in Python

venutaurus539 at gmail.com venutaurus539 at gmail.com
Tue Nov 25 00:11:52 EST 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.



More information about the Python-list mailing list