----------------------------------------------------------- New Message on BDOTNET
----------------------------------------------------------- From: Jigs Message 2 in Discussion Hi Prince, If you are looking for some 3rd party component, there are lots of available on internet. JMail is one of the good component. you can read about it here http://www.15seconds.com/component/pg000036.htm Alternative if you want to do coding from scratch building component. then here is the small code from my code bank which i had download long long back... using System; using System.Text; using System.Net.Sockets; namespace Email1 { class MessWithDundee { [STAThread] static void Main(string[] args) { TcpClient tcpClient = new TcpClient(); try{ tcpClient.Connect("pop3.dundee.net", 110); NetworkStream networkStream = tcpClient.GetStream(); if(networkStream.CanWrite && networkStream.CanRead){ // Stand back, I'm not sure how big this gets ... Console.WriteLine(tcpClient.ReceiveBufferSize); // Read greeting byte[] bytes = new byte[tcpClient.ReceiveBufferSize]; networkStream.Read(bytes, 0, (int) tcpClient.ReceiveBufferSize); Console.WriteLine(Encoding.ASCII.GetString(bytes)); // Send user Byte[] sendBytes = Encoding.ASCII.GetBytes("USER jeffries\r\n"); networkStream.Write(sendBytes, 0, sendBytes.Length); // Read response bytes = new byte[tcpClient.ReceiveBufferSize]; networkStream.Read(bytes, 0, (int) tcpClient.ReceiveBufferSize); Console.WriteLine(Encoding.ASCII.GetString(bytes)); // Send QUIT sendBytes = Encoding.ASCII.GetBytes("QUIT\r\n"); networkStream.Write(sendBytes, 0, sendBytes.Length); } else if (!networkStream.CanRead){ Console.WriteLine("You can not write data to this stream"); tcpClient.Close(); } else if (!networkStream.CanWrite){ Console.WriteLine("You can not read data from this stream"); tcpClient.Close(); } } catch (Exception e ) { Console.WriteLine(e.ToString()); } } } } Regards, Jignesh Desai ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/bdotnet/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
