I am looking to retrieve a number of properties from each email after executing the ‘GetOutlookMailMessage’ step.
I am able to pull out the From, To, Subject, Body and Attachments.
I need to be able to pull out the Received Date, Modified Date and Message ID (this is a unique identifier for each email).
I believe the problem is that the MailMessage class does not contain these properties on their own (perhaps they exist in the headers).
Any suggestions or solutions would be most welcome.
Follow a example to get all of this properties.
getMailProperties_Example.xaml (10.1 KB)
Hope It Helps!
You can access headers of the email object like this :
To have an exhausted list of the properties you can get from the headers, you can get them from this link MailMessage.Headers Propriété (System.Net.Mail) | Microsoft Docs.
Hope that helps.
Masire, thank you so much,
When I try this in UiPath, I get the following error:
It seems as if it doesn’t recognize the single quote at the end of the property name. Any thoughts?
Ok, so I figured it out.
In UiPath, it needs to be written like this:
i am trying to use Gteoutlookmail message to pick one oldest unread mail and mark it as read.using headers will happen only after getting a group of messages… i want to mark only one mail as read.
Is it possible to insert your solutions?
How can I get message ID? I tried “mail.Header(“Id”)” . It is giving nothing.
I got the solution for that. I’ve used “mail.Header(“Message-ID”)” and it’s working fine.
As you provided the solution, it no containe about the Date.Please once check above question