从交换服务器读取电子邮件 [英] Reading emails from an exchange server

查看:83
本文介绍了从交换服务器读取电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从交换服务器读取电子邮件并与它们进行骚扰,但遇到问题.我认为我的应用程序无法正确检索邮件,因为当我搜索特定收件箱中的webapp时,它会找到1000个结果,但是当我搜索相同的文本时,它只会找到333个结果.这是我的代码:

I''m trying to read emails from an exchange server and make an raport with them, but i encounter a problem. I think my application dosen''t retrive the mail correctly, because when I search the specific Inbox throw the webapp it finds 1000 results but when i search the same text it finds only 333. This is my code:

using Higuchi.Net.Pop3; 
Pop3Client pop3Client = new Pop3Client("username", "pass", "srv");
pop3Client.Authenticate();
long totalCount = pop3Client.GetTotalMessageCount();
for (int emailCounter = 1; emailCounter < totalCount + 1; emailCounter++)
{
	Pop3Message mg = pop3Client.GetMessage(emailCounter);
	sr.WriteLine(mg.Subject);
}
pop3Client.ExecuteQuit();
Console.WriteLine("Finished!");
sr.Close();
Console.ReadLine();



我尝试了不同的类来读取pop3电子邮件,结果仍然相同.交换服务器是2010.



I tryed diffrent class for reading pop3 email still same result. The exchange server is 2010.

推荐答案

我认为此链接将为您提供帮助
http://stackoverflow.com/questions/5249540/c-从交换服务器中锋利地编程读取电子邮件-exchange-server"target =" _ blank"title ="新窗口> ^ ]

http://omegacoder.com/?p=454 [
I think this link will help you
http://stackoverflow.com/questions/5249540/c-sharp-programmatically-reading-emails-from-the-exchange-server[^]
and
http://omegacoder.com/?p=454[^]


这篇关于从交换服务器读取电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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