Get IMAP Mail Message

The robot I have gets the attachments from a email, I have the checkboxes “MarkAsRead” and “OnlyUnreadMessages” checked.
But when I run the robot it gets all the messages even if there are no unread messages in my inbox.
I also have this filter: "“UNSEEN ON " + DateTime.Today.ToString(“dd-MMM-yyyy”)” but still get all the read messages. How do I only get the unread messages?

Hi @davidlan

  1. Check with the mail message count.

  2. Specify the Count from the Properties Of the Mail Message Activity that you’re using.

3.Check Whether that your reading the correct folder from the properties Panel of the Mail message activity.


Hi @davidlan ,

Instead of filtering directly through property, i will suggest to get all unread emails and then use below function to filter current day mails.

allMails.Where(Function(x) DateTime.ParseExact(x.Headers(“Date”),“mm/dd/yyyy HH:mm:ss”,Nothing).Date.Equals(DateTime.Now))

Hi How we can check email count

Hi @Vivek_Kumar4



1 Like