The task is as follows:
- Get all emails from the mailer (from the Inbox folder of a specific account).
- Find the right letter and get a hyperlink from it.
So, I managed to get emails using the MailKit library, but I can’t get a hyperlink from the desired email, as I can do it using the MailKit library. Here is a piece of code with which I get all the necessary emails
public void GetMessages() { SetUpConnection(); var inbox = client.Inbox; inbox.Open(FolderAccess.ReadOnly); var folders = client.GetFolder(client.PersonalNamespaces[0]); System.Diagnostics.Debug.WriteLine("Folder test {0}", folders.Count); foreach(var folder in folders.GetSubfolders()) { foreach(var subFolder in folder.GetSubfolders()) { if (subFolder.Name.Equals("Вся почта") || subFolder.Name.Equals("All Mail")) { subFolder.Open(FolderAccess.ReadOnly); for (int i = subFolder.Count - 1; i > subFolder.Count - 20; i--) { System.Diagnostics.Debug.WriteLine("Subject: " + subFolder.GetMessage(i).Subject); System.Diagnostics.Debug.WriteLine("TextBody: " + subFolder.GetMessage(i).TextBody); } } } } }