惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 【当耐特】
Help Net Security
Help Net Security
P
Proofpoint News Feed
J
Java Code Geeks
爱范儿
爱范儿
Last Week in AI
Last Week in AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
F
Full Disclosure
Google DeepMind News
Google DeepMind News
H
Help Net Security
G
Google Developers Blog
Jina AI
Jina AI
Vercel News
Vercel News
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
L
Lohrmann on Cybersecurity
S
Schneier on Security
Microsoft Azure Blog
Microsoft Azure Blog
IT之家
IT之家
Security Archives - TechRepublic
Security Archives - TechRepublic
阮一峰的网络日志
阮一峰的网络日志
N
News and Events Feed by Topic
GbyAI
GbyAI
B
Blog
O
OpenAI News
博客园_首页
Cisco Talos Blog
Cisco Talos Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Hacker News: Ask HN
Hacker News: Ask HN
TaoSecurity Blog
TaoSecurity Blog
腾讯CDC
MongoDB | Blog
MongoDB | Blog
M
MIT News - Artificial intelligence
C
Cybersecurity and Infrastructure Security Agency CISA
Cyberwarzone
Cyberwarzone
Webroot Blog
Webroot Blog
Simon Willison's Weblog
Simon Willison's Weblog
Y
Y Combinator Blog
C
Cisco Blogs
A
Arctic Wolf
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
The Exploit Database - CXSecurity.com
Security Latest
Security Latest
AI
AI
W
WeLiveSecurity
aimingoo的专栏
aimingoo的专栏
The Register - Security
The Register - Security
Project Zero
Project Zero
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
Netflix TechBlog - Medium
Blog — PlanetScale
Blog — PlanetScale

博客园 - Be Myself

安装Docker Toolbox后出现的问题 SharePoint 2013 必备组件之 Windows Server AppFabric 安装错误 日志记录组件 ASP.NET 中执行 URL 重写 Could not load file or assembly 'System.Data.SQLite' or one of its dependencies Visual Studio 2012 cannot identify IHttpActionResult distributed caching for .net applications HTTP Error 503. The service is unavailable windows 7 HTTP Error 500.21 - Internal Server Error resolution ! C#字符串反转 - Be Myself - 博客园 HTTP could not register URL http://+:****/WCFService/. Your process does not have access rights to this namespace CSpider 安装和配置branchcache asp.net下url参数含有中文读取后为乱码 找出数组中是否有重复的数 时间复杂度为O(n)的排序算法 IIS 7.0 HTTP 错误 404.3 - Not Found解决办法 博文阅读密码验证 - 博客园 MSMQ, WCF and IIS: Getting them to play nice (Part 3)[转]
Exchange WebSerivce Usage
Be Myself · 2014-06-23 · via 博客园 - Be Myself

//ExchangeService版本为2007SP1              

ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP2);            

//参数是用户名,密码,域              

service.Credentials = new WebCredentials("xxx@xxx.com", "xxxxxx", "xxx");            

//给出Exchange Server的URL              

//service.Url = new Uri("mail.xxxx.com");            

//你自己的邮件地址 xxx@xxx.xxx              

service.AutodiscoverUrl("xxx@xxx.com");            

//创建过滤器, 条件为邮件未读.              

SearchFilter sf = new SearchFilter.IsEqualTo(EmailMessageSchema.IsRead, false);            

//查找Inbox,加入过滤器条件,结果10条              

FindItemsResults<Item> findResults = service.FindItems(                 WellKnownFolderName.Inbox,                 sf,                 new ItemView(100));

            if (findResults.Items.Count > 0)          

   {             

    PropertySet detailedPropertySet = new PropertySet(BasePropertySet.FirstClassProperties, AppointmentSchema.Recurrence);

                service.LoadPropertiesForItems(from Item item in findResults select item, detailedPropertySet);      

       }

            foreach (Item item in findResults.Items)      

       {            

     EmailMessage email = EmailMessage.Bind(service, item.Id);

                string content = item.Body.Text;

                if (!email.IsRead)              

   {                     Console.WriteLine(email.Body);             

        //标记为已读                  

     email.IsRead = true;                  

   //将对邮件的改动提交到服务器                

       email.Update(ConflictResolutionMode.AlwaysOverwrite);    

       }      

       }