Accessing Modification Time of an Outlook Mail in Python

V

venutaurus539

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.
 
I

Iain King

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.

This looks like the API for the Message object:
http://msdn.microsoft.com/en-us/library/ms526130(EXCHG.10).aspx
Looks like you want TimeLastModified

Iain
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,731
Latest member
MarcyGipso

Latest Threads

Top