I am trying to get the date an email was sent in Outlook.
I am able to read the body but I think the date is part of the header.
I tried this: item.Headers(“Date”) but it does not work. I read somewhere this function does not work anymore.
Do you have any idea if there is any way to get this date?
During my testing I also came across one mail that contained an empty header (date). The date is added into the header by the receiving server. It is therefore possible for this property to be null (and thus deliver an empty result in your case).
Likewise, the following would also deliver an empty String:
Is this just one scenario or do you have multiple occurences?
I am constantly marking old emails as unread in order to try this part of the process.
The problem is that the header does not get recognized, if I try to print only the header information it looks like it only has a certain MessageID