我如何使用C#阅读收到的邮件 [英] How do I read incoming mail using C#

查看:134
本文介绍了我如何使用C#阅读收到的邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要寻找一个解决方案,让我读传入电子邮件。这三种方法我能想到的要做到这一点,此刻是:

I am looking for a solution to allow me to read incoming emails. The three methods I can think of to do this at the moment are:


  1. 创建一个电子邮件服务器解析电子邮件

  2. 挂钩到现有的Exchange服务器

  3. 勾成已经设置了一个电子邮件帐户前景

什么是做到这一点的最好方法是什么?而一个人如何去实现它?

What is the best way to do this? And how does one go about implementing it?

感谢

推荐答案

如果您已经与Exchange服务器作为邮箱主机处理,我建议利用它通过IMAP(首选)或POP访问。最近,我开发了通过 AfterLogic的MailBee.NET IMAP组件我认为这是值得访问指定的邮箱解决方案该建议。他们有一个标准的试用版,并合理的定价。此外,如果你走这条路线POP或IMAP自动化是足够的灵活性,几乎所有的邮箱服务器平台工作;它没有仅限于Exchange环境。

If you are already dealing with an Exchange server as the mailbox host I would suggest leveraging that via IMAP (preferred) or POP access. Recently I developed a solution that accesses a specified mailbox via AfterLogic's MailBee.NET IMAP component which I think is worth the recommendation. They have a standard trial version and reasonable pricing. Also if you go this route either POP or IMAP automation is flexible enough to work with almost any mailbox server platform; It doesn't have to be limited to Exchange environments.

也有免费的.NET组件IMAP在那里,可以做的工作也是如此。在我有限的研究,我发现,免费的替代不太满足我所有的要求,或并没有想象中简单易学,但您的情况可能会有所不同。为了完整起见,这里是我决定花这笔钱上的MailBee之前考虑的替代/免费IMAP库列表:

There are also free .NET IMAP components out there that may do the job as well. In my limited research I found that the free alternatives didn't quite meet all of my requirements or were not as easy to learn but your situation may differ. For completeness, here is a list of alternative / free IMAP libraries I considered before deciding to spend the money on MailBee:

  • ImapX - http://hellowebapps.com/products/imapx/
  • LumiSoft.Net Imap Client - http://www.lumisoft.ee/lswww/download/downloads/Net/
  • InterIMAP - http://interimap.codeplex.com/

要解决你问题的第二部分......在我最近的一个项目的实施参与编写引用的MailBee一个非常简单的控制台应用程序.NET IMAP库。控制台应用程序有一个标准的配置文件,并接受命令行参数作为参数。我们定义的Windows计划任务,根据我们的工艺需求,运行控制台应用程序。我相信你会这样去做任何数量的其他方式,但这是我们的需求,最简单的方法。

To address the 2nd part of your question... The implementation in my recent project involved writing a very simple console application that references the MailBee.NET IMAP library. The console application has a standard config file and accepts command line arguments as parameters. We define Windows scheduled tasks to run the console application according to our process needs. I am sure you could do this any number of other ways but this was the simplest approach for our needs.

这篇关于我如何使用C#阅读收到的邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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