Home > Blockchain >  Timestamp of Outlook emails using Python
Timestamp of Outlook emails using Python

Time:12-04

Is it possible to use Python to extract timestamps from received email? I'm using the following code but to no avail:

messages = ap.Items
message = messages.GetNext()
receipt = message.ReceivedTime.date()  

for i in messages:
    print(receipt)

I only get one date published repeatedly for each email. (i.e., 2021-11-22, 2021-11-22, 2021-11-22.......)

Any help will be much appreciated.

CodePudding user response:

Well, of course - you only retrieve ReceivedTime once:

for i in messages:
    print(i.ReceivedTime.date())
  • Related