加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

EWS Managed API 2.0 设置获取邮件自动回复功能

发布时间:2020-12-15 04:37:50 所属栏目:百科 来源:网络整理
导读:摘要 最近要在邮件提醒功能中添加,自动回复的功能。在移动端获取用户在outlook上是否开启了自动回复功能,如果用户在outlook上开启了自动回复功能, 获取用户自动回复的内容,如果没有开启,用户可以在移动端开启自动回复并且可以设置自动回复的内容,当然

摘要

最近要在邮件提醒功能中添加,自动回复的功能。在移动端获取用户在outlook上是否开启了自动回复功能,如果用户在outlook上开启了自动回复功能, 获取用户自动回复的内容,如果没有开启,用户可以在移动端开启自动回复并且可以设置自动回复的内容,当然,用户也可以在移动端进行关闭。

一个例子

获取用户自动回复的信息。

ExchangeService service = Main(= Uri(= NetworkCredential(,, oofSettiing = service.GetUserOofSettings( (oofSettiing != msg == = doc.DocumentNode.SelectNodes( (pLists != && pLists.Count > ( item

注意获取的自动回复内容为html标签的,所以需要过滤,这里使用HtmlAgilityPack组件,对html进行解析。

如图所示

设置自动回复

myOOF = myOOF.State = </span><span style="color: #008000;"&gt;//</span><span style="color: #008000;"&gt; Select the time period during which to send OOF messages.</span> myOOF.Duration = <span style="color: #0000ff;"&gt;new</span> TimeWindow(DateTime.Now.AddDays(<span style="color: #800080;"&gt;4</span>),DateTime.Now.AddDays(<span style="color: #800080;"&gt;5</span><span style="color: #000000;"&gt;)); </span><span style="color: #008000;"&gt;//</span><span style="color: #008000;"&gt; Select the external audience that will receive OOF messages.</span> myOOF.ExternalAudience =<span style="color: #000000;"&gt; OofExternalAudience.All; </span><span style="color: #008000;"&gt;//</span><span style="color: #008000;"&gt; Set the OOF message for your internal audience.</span> myOOF.InternalReply = <span style="color: #0000ff;"&gt;new</span> OofReply(<span style="color: #800000;"&gt;"</span><span style="color: #800000;"&gt;I'm out of office. I'll be back tomorrow. Thanks!</span><span style="color: #800000;"&gt;"</span><span style="color: #000000;"&gt;); </span><span style="color: #008000;"&gt;//</span><span style="color: #008000;"&gt; Set the OOF message for your external audience.</span> myOOF.ExternalReply = <span style="color: #0000ff;"&gt;new</span> OofReply(<span style="color: #800000;"&gt;"</span><span style="color: #800000;"&gt;I'm out of the office but will reply to emails when I return. Thanks!</span><span style="color: #800000;"&gt;"</span><span style="color: #000000;"&gt;); service.SetUserOofSettings(</span><span style="color: #800000;"&gt;"user</span><span style="color: #800000;"&gt;@xxxx.com</span><span style="color: #800000;"&gt;"</span>,myOOF);</pre>

资料

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读