using (ImapClient client = new ImapClient(hostname, 993, username, password, AuthMethod.Login, true)) { IEnumerable<uint> uids = client.Search(SearchCondition.Unseen()); // Fetch the mail headers of the first message and print it's subject line. if (uids.Count() > 0) { MailMessage msg = client.GetMessage(uids.First(), FetchOptions.TextOnly); s= ("Subject: " + msg.Subject); textBox1.Text = s; d=("From:" + msg.From); textBox2.Text = d; b = ("Body: " + msg.Body); textBox3.Text = b; }</uint>
var firstTen = client.GetMessages(uids.Take(10), FetchOptions.TextOnly) foreach(MailMessage msg in firstTen) { // ... your code here }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)