如何在Windows应用程序中接收邮件 [英] How to receive a mail in Windows application

查看:92
本文介绍了如何在Windows应用程序中接收邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

我知道如何在.Net中发送电子邮件,但是:

I know how to send emails in .Net but:


  • 如何接收电子邮件我的Windows表单?

  • 如何阅读电子邮件?

推荐答案

接收电子邮件和检索电子邮件之间是有区别的。您想要哪个?

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

如果您想接收电子邮件,则意味着您需要设置一个套接字侦听器,并列出SMTP命令。基本上,您必须构建自己的SMTP服务器来接受电子邮件。

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.

另一种方法是检索电子邮件,这意味着您要使用POP3或IMAP4协议提取电子邮件。这取决于您要连接的服务器,以下载电子邮件。如果您想走这条路,那么您可能想用Google搜索C#和POP3(或IMAP4)。

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).

如果您已经拥有电子邮件的内容,并且只需要阅读它们,那么您就需要一个Mime解析库。

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

这篇关于如何在Windows应用程序中接收邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆