tags:

views:

87

answers:

3

Possible Duplicate:
Recommendations for a .NET component to access an email inbox

i was checked out for sending a email....it was working....but i want to know how to receive a email in my windows forms....plz send me a coding of that....

Translation: I know how to send emails in .Net but not how to read them. Please share a code snippet for reading email.

A: 

For receiving email, see this POP3 example.

Take a look at this example of SMTP Client for sending.

Paul Sasik
A: 

You should use a library for it. I'm using following:

http://www.codeproject.com/KB/IP/Pop3MimeClient.aspx

afsharm
A: 

Hi, There is a difference between receiving email, and retrieving email. Which one do you want?

If you want to receive email, that mean you need to set up a socket listener, and listing for SMTP commands. Basically, you have to build your own SMTP server to accept email.

The other way, is to retrieve email, which means you want to use the POP3 or IMAP4 protocol to fetch emails. This depends upon the server you are connecting to, to download the emails. If you want to go this route, then you may want to google for C# and POP3 (or IMAP4).

If you already have the content of the emails, and you simply need to read them, then you need a Mime parsing library.

Cheers! Dave

dave wanta