以编程方式检查Outlook电子邮件 [英] Programmatically Checking for Outlook E-mails

查看:91
本文介绍了以编程方式检查Outlook电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在与第三方建立自动回复.第三方只能通过电子邮件进行响应,因此我需要一种确定何时收到新电子邮件的方法.我的计划是创建一个Windows任务,该任务将运行一个C#程序,以检查是否有新电子邮件来自该第三方.

I'm setting up an automated response with a third party. The third party can only respond via e-mail, so I need a way to determine when I get a new e-mail. My plan is to create a windows task that will run a C# program that checks to see if a new e-mail is from this third party.

我的公司使用Outlook,它基于Microsoft Exchange数据库运行.我做了一些研究,发现有些人使用Microsoft MAPI命名空间.这是解决方法吗?有什么方法可以使用System.Net.Mail从特定地址检查新邮件吗?

My company uses outlook, which runs off of the Microsoft Exchange database. I did some research, and I saw that some people use the Microsoft MAPI namespace. Is this the way to go about it? Is there some way that I can use System.Net.Mail to check for new mail from a particular address?

谢谢, 亚伦

推荐答案

根据您的要求,您可以使用Outlook Interop/MAPI,它只是从代码中使用Outlook-在这种情况下,请查看:Microsoft.Office.Interop.Outlook程序集. 这样做的好处是,事件会触发邮箱中弹出的新项目.

Depending on your requirements you could use Outlook Interop / MAPI which is simply using Outlook from code - in this case look at: Microsoft.Office.Interop.Outlook assembly. This has the benefit of an event firing on new items popping up in your mailbox.

另一方面,如果您的服务器支持POP3,则只需获取随机的POP3 libray并定期查询服务器即可.

On the other hand if your server supports POP3, you can simply get random POP3 libray and periodically query the server.

这篇关于以编程方式检查Outlook电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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