开发者

How to receive a mail in Windows application [duplicate]

This question already has answers here: Closed 12 years ago.

Possible Duplicate:

Recommendations for a .NET component to access an email inbox

I know how to send emails in .Net but:


For receiving email, see this POP3 example.

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


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

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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜