I need to get the email received date in linq query and save it as a variable
please help
Thanks&Regards,
aman
I need to get the email received date in linq query and save it as a variable
please help
Thanks&Regards,
aman
Hi @lrtetala
Im looking in Linq query because of im filtering the mails in linq query only
mails.Select(Function(recieved) recieved.Headers(“Date”)).ToArray
You can try this to get all dates of recieved mails as an array of string
Fetch all the mails using “Get Outlook mail”
And then Write a LINQ query to filter mails.
Note: U need “Get Outlook Mail Messages” activity to fetch mails from Outlook
im not able to store the value in variable
could you share what error you are recieving
im using outlookmail activity, you can see in below image
however the in my mail box having only 1 unread mail, but its showing all the mails dates
Can you try checking MarkAsRead and trying it again
Hi @aman4 ,
Could you elaborate on what is actually required for your case ?
Do you want to filter the Emails based on the received and then store those emails as an Array of MailMessages ?
Or Do you just want to store the Date values of all the Emails received ?
Clarifying this requirement will help us to suggest accurate responses.
I have 2 unread messages in my outlook account and the below output is generated.
array1 Linq is - mailMessages.Select(Function(recieved) recieved.DateAsDateTime.ToString(“dd/MM/yyyy”)).ToArray
array2 Linq is - mailMessages.Select(Function(recieved) recieved.Date.ToString).ToArray
If you want to only process a mail once, then in properties of get outlook mail message, check MarkAsRead as true