[spambayes-dev] Accessing delivery time of an email message!

Sanjay Darisi sanjaydarisi at cox.net
Mon Nov 17 21:14:25 EST 2003

If I want to access the time stamp on the email (Outlook), which 
property should I use? Is it PR_DELIVER_TIME that I need to use? It's a 
PT_SYSTIME type,  So the documentation says that it is pyTime object. 
So, I tried using time.ctime(int(deliverytime))  and it complains 
ValueError: unconvertible time

This is what i've done,

In SB\Outlook2000\msgstore.py

in class MAPIMsgStoreMsg,  I added PR_DELIVER_TIME to message_init_props 
. And

tag, deliverytime = prop_row[8]

self.deliverytime = deliverytime

And at the end, in the test() function

for msg in folder.GetMessageGenerator():
    print time.ctime(int(msg.deliverytime))

When I execute msgstore.py at the command prompt, it says ValueError: 
unconvertible time.  Am I missing anything obvious? How can I access the 
sent/delivery time of an email message in outlook?

Thank you in advance,

More information about the spambayes-dev mailing list