I tried this :
- Code: Select all
ImapClient imapClient = new ImapClient();
//Set host, username, password etc. for the client
imapClient.Host = "outlook.office365.com";
imapClient.Username = "myemail@outlook.com";
imapClient.Password = "mypassword";
imapClient.Port = 143;
imapClient.ConnectionProtocols = ConnectionProtocols.Ssl;
//Connect to the server
imapClient.Connect();
imapClient.Select( "Inbox" );
//Get the last recieved message by its sequence number
MailMessage Message = imapClient.GetFullMessage( imapClient.GetMessageCount( "Inbox" ) );
but I want to get all messages.
thank you in advance .