Getting MailItem Received Time

I’m trying to get the property: Received Time from my “Get outlook mail message” step.

However, the get mail messages returns an array of mailmessages which does not have the property “Received Time” - https://msdn.microsoft.com/en-us/library/system.net.mail.mailmessage(v=vs.110).aspx

Was wondering if anyone has found a workaround this?

Thanks in advance! YP

Hi,

You can get the Date from the header of the message like this:

message.Headers(“Date”)

1 Like

perfect sarathi, thank you very much :slight_smile:

Hi All,

I am not able to retrieve mails from correct Inbox.

I am passing folder As “Inbox” but i am getting mails from archive folder.

Please assist me to find out solution for this issue.

It’s not working for me can you help?

It’s not working for me can you help Sarathi sir?

For me, DateReceived was the Header I needed.

You can check the Header keys that apply to your case like this:

  1. Get mail Messages from a folder
  2. Use a for each loop to loop through the header keys of 1 Message (eg: MailMessage(0).Headers.Allkeys). In the body: use a write line
  3. Run the bot and check your output

image

@loginerror Basically the task is to calculate the time of reply sent for a mail (subject and user are dynamic) … We will have to take subject of a mail from inbox and compare it with mail in sentmail and if the reply mail contains the subject (“RE: Subject from inbox”). Then will take time of those mails and subtract, calculate time taken for reply
came up with substring method but that is also not working for me, can you help?Subjectbased.xaml (9.6 KB)