I’m using the following code to get MailMessages from a Imap server.
First it gets a list of all messages, then it uses FetchMessage to get the actual MailMessage object.
Currently, the Mail is deleted on the server when FetchMessage is executed. But instead of deleting the message, i’d like to just set it to read.
Is this Possible? If yes, how can this be done?
ImapClient imapClient = new ImapClient("outlook.office365.com", 993, Aspose.Email.Clients.SecurityOptions.SSLAuto);
imapClient.Username = "MyUserName";
imapClient.Password = "MyPassword";
foreach (ImapMessageInfo imapMessageInfo in imapClient.ListMessages().Take(100))
{
Aspose.Email.MailMessage mailMessage = imapClient.FetchMessage(imapMessageInfo.SequenceNumber);
}