Check if email has been marked as read

Hi,

Is it possible to detect if an email in the outlook inbox has been read? If yes, how please.

Thanks.

1 Like

Hi,

How about the following approach?

First, read mails without OnlyUnreadMessages : Let’s say mailsAll
Next, read mails with OnlyUnreadMessages : Let’s say mailsUnread

Then

mailsRead = mailsAll.Where(Function(m) not mailsUnead.Select(Function(m2) m2.Headers("Message-ID").ToString).Contains(m.Headers("Message-ID").ToString)).ToList 

We can easily check if the mail exists in mailsRead or mailsUnread.

Regards,

1 Like

Yes, you can check whether an email is read or unread by using MailMessage.IsRead property. for more details, please check Outlook Email Automation and https://docs.uipath.com/activities/docs/get-outlook-mail-messages. You can also use https://docs.uipath.com/activities/docs/get-exchange-mail-messages

1 Like