How to mark Outlook mil message as Read. I want to set this option only after mail is downloaded and not when i get the eMail
In the property of Get Outlook Mail Messages activity, check against MarkAsRead

Hi Lawanya,
Many Many Happy Returns of the day.![]()
Not sure this is the right solution but working ![]()
You can just put the get outlook mail message activity by checking âMark As Readâ in the property option after âSave Mail Messagesâ Activity.
PS: I guess your probably saving the mail by some condition so make sure you use the same condition in the filter property of get outlook mail message just to avoid reading all the unread mail.
in a multi robo solution i want to only pick one mail. UIpath default picks newest mail instead it must pick oldest in read mail first
Besides Dilipâs solution, can you try â[ReceivedTime] ascâ in filter and check if the syntax works? Never tried, just curious.
getting COM Exception âŠ
Hi @lawanyaram,
You can try to get all mails and take the last one of the list to get the oldest one. It could work but might be slow if you have tons of mails in your mailbox.
To get all mails I use to put -1 in the property Top.
Please try and let us know!
Regards,
Thanks. I am looking for the option to pick one mail at a time and only mark that particular mail as Read. Current solution we get allows to pick all unread mails and order them. But after picking one mail I donât get option to mark that mail alone as read.
I am looking for option to explicility mark mail as read from code after filtering the mail using mailMessages.OrderBy(Function(x) DateTime.Parse(x.Headers(âDateâ).ToString)).ToList
Marking mail as read in above code will mark all mails as read
Hi @lawanyaram,
Did you find a solution in your problem?
Iâm also need a similar workflow that will mark as read an email after I open it and not all the emails.
Their solution is put check on MarkAsRead but it will mark all the message Unread upon getting the message.
Hi
I have used the below logic in our projects and it helps
ï Use logic like below.
- MailMessages.OrderByDescending(Function(x) DateTime.Parse(x.Headers(âDateâ).ToString)).ToList .Count>0 and pick one mail.
- Move picked mail to a subfolder.
- On processing pick the mail from subfolder using subject filter and mark as Read ( Filter like â[from]='â+ArgMailMessages.From.DisplayName.ToString+â'â
Hi, Can you explain more what u did with this
Lecture des mails
Ce tuto a pour but dâexpliquer comment rĂ©cupĂšre-t-on, les mails que seul le robot en route en a besoin.
1 : Récupération des mails non lus depuis la boite de réception (Ne pas cocher le {Mark as Read})
2 : Stockage des mails non lus dans une liste
3 : Mise en place dâune condition pour conditionner le traitement aux mails voulus
4 : Instructions relatives Ă la condition si vrai.
5 : Permet de dĂ©placer les mails traitĂ©s (ceux qui concerne notre robot), vers un dossier créé, au prĂ©alable lors de la configuration de la boite mail, oĂč agit le Robot.
6 : RĂ©cupĂšre les mails, mais cette fois au niveau du dossier créé, et marque les mails comme lu(La case {Mark as Read} doit ĂȘtre cochĂ©e)
7 : Dans le cas ou nos conditions ne sont pas satisfaites, notre Robot nâaura aucune tache Ă exĂ©cuter, sauf peut-ĂȘtre, celle dâappeler un autre Robot, pour quâil puisse traitĂ© Ă son tour les mails non-lu, et ainsi de suite.
Rédiger par : Issam LAHRECH
