pop3 mail
-
hi im developing a mail application.im able to send mail through smtp mail .but my requirement is i have to receive mails thro pop3 .i did that thro this code try { // You will need to set these to your settings. // The settings here are settings for a local // demo POP3 server // that I use for testing. string xHost = "127.0.0.1"; string xUsername = "chad"; string xPassword = "pass"; using (POP3 xPOP3 = new POP3()) { xPOP3.Username = xUsername; xPOP3.Password = xPassword; xPOP3.Connect(xHost); int xCount = xPOP3.CheckMessages(); if (xCount == 0) { Console.WriteLine("No messages on account."); } else { Message xMsg = new Message(); xPOP3.Retrieve(1, xMsg); Console.WriteLine("Subject: " + xMsg.Subject); Console.WriteLine("From: " + xMsg.From.Text); Console.WriteLine("To: " + xMsg.Recipients[0].Text); Console.WriteLine(); Console.WriteLine(xMsg.Body.Text); } try { } finally { xPOP3.Disconnect(); } } } catch (Exception e) { Console.WriteLine(e.Message); } Console.WriteLine(""); Console.WriteLine("Press enter"); Console.ReadLine(); but i edited the attributes according to the req but im geting an error like reference is not their for POP3 class .im using system.web.mail name space please help with this. hi to all with regards, susa