I need to get the date an email was received and save it as a variable. I have tried using emailVariable.Headers(“date”) but it is returning no value, just blank. The mail messages are of the type Office365Message.
Office 365Emails will be of Datatype: Office365Message
When you are facing this issue then lets first cleared on what you have implemented so far. Please let us know also which mail relevant package versions you have configured for the project. Thanks
I am using the Get Mail activity inside a Microsoft Office 365 Scope. The output is a variable of type Office365Message
I am then looping through each email to extract some info from the body and the date it was received. Here is a screenshot of the packages I have.
ok we do see the 1.11.1 package which was mentioned above with the defect that headers will be empty, just give a try on update to the newest preview version
A construct like:
will have Office365Message Array as mentioned above:
Maybe you have to adopt your TypeArgument or you let us know more details on the
I figured it out! My type argument in my for each activity was system.net.mail.mailmessage rather than outlookmessage. Once I changed it I am able to use EmailVariable.ReceivedDateTime
Simple mistake but you helped me see it and I can use your EmailVariable.ReceivedDateTime solution now.
Outlook365Message inherits from MailMessage so both should have the same properties available. It not working is probably due to the bug mentioned by Peter. Why don’t you just try his suggestion and update to the later version of the package before changing anything else?