How to send Outlook tasks requests by mail without Outlook?(如何在没有 Outlook 的情况下通过邮件发送 Outlook 任务请求?)
问题描述
我需要复制 Outlook
特性/功能以向某人发送一些任务请求(see here) 但使用 ASP.NET C#
从网络服务器发送邮件和没有在网络服务器上安装 Outlook(因此无法使用 Outlook 自动化).
我已经检查了执行此操作的可能性,将任务发送给某人的常见方法似乎是生成 iCalendar
格式的 .ics
文件,并将该文件包含在邮件中(查看此 stackoverflow 问题).p>
效果很好,但是 Outlook 发送的任务不等同:
- 事件 (VEVENT) 有开始日期和结束日期(类似于任务),但没有完成"字段(这是有意义的,因为它是事件,而不是任务).
- 待办事项 (VTODO) 只有截止日期,没有开始日期或结束日期 Outlook 不支持.
我检查了自己 Outlook 在包含任务请求的邮件中究竟发送了什么:它包括一个 winmail.dat
文件(带有 content-type:application/ms-tnef
) 编码为 Base64
.在那个文件(这是一个二进制文件)里面有一个对 IPM.TaskRequest
的引用,这似乎是我需要的.
我检查了网络并找到了一些 TNEF 解析器,但我需要相反的:从 C# 代码生成一个包含任务请求的 TNEF 文件.我想知道是否有办法做到这一点.使用库(无论是否免费)都不是问题.
即使 Outlook 安装在 Web 服务器上,在服务器上使用 Outlook 自动化通常也是一个坏主意.
但是,您是否了解过 Exchange Web 服务?它提供了一个完整的对象模型来与 Outlook 集成.显然它与 Outlook 相关(与 ics 不同),但它似乎确实适合您的用例.
EWS 概述:http:///msdn.microsoft.com/en-us/library/exchange/dd877045%28v=exchg.140%29.aspx
处理任务:http://blogs.msdn.com/b/dhruvkh/archive/2012/04/06/working-with-tasks-using-exchange-web-services.aspx
I need to replicate the Outlook
feature/functionnality to send some tasks requests to someone (see here) but with mails sent from a webserver using ASP.NET C#
and without Outlook installed on the webserver (thus using outlook automation is not possible).
I already check what are the possiblities to do this, and it seems a common way to send tasks to someone is to generate an .ics
file in iCalendar
format, and include that file to the mail (see this stackoverflow question).
It works great, however there is no equivalence of tasks sent by outlook :
- Events (VEVENT) have a start date and end date (like a task) but no "completion" field (which make sense since it is an event, not a task).
- Todos (VTODO) have only a due date, no start date or end date and it is not supported by outlook.
I checked myself what Outlook exactly send in a mail containing a task request : It include a winmail.dat
file (with content-type:application/ms-tnef
) encoded as Base64
. Inside that file (which is a binary file) there is a reference to IPM.TaskRequest
which seems to be what i need.
I checked the web and found some TNEF parsers, but i need the oposite : to generate from C# code a TNEF file that would contains a task request. I would like to know if there is a way to do that. Using a library (free or not) is not an issue.
Even if outlook were installed on the web server, outlook automation on a server is generally a bad idea.
However, have you looked at Exchange Web Services? It provides a complete object model to integrate with outlook. Obviously it's tied to outlook (unlike ics), but it does seem to fit your use case.
EWS overview: http://msdn.microsoft.com/en-us/library/exchange/dd877045%28v=exchg.140%29.aspx
Working with tasks: http://blogs.msdn.com/b/dhruvkh/archive/2012/04/06/working-with-tasks-using-exchange-web-services.aspx
这篇关于如何在没有 Outlook 的情况下通过邮件发送 Outlook 任务请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在没有 Outlook 的情况下通过邮件发送 Outlook 任务请求?
基础教程推荐
- c# Math.Sqrt 实现 2022-01-01
- 如何激活MC67中的红灯 2022-01-01
- rabbitmq 的 REST API 2022-01-01
- MS Visual Studio .NET 的替代品 2022-01-01
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- 将 XML 转换为通用列表 2022-01-01
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01
- SSE 浮点算术是否可重现? 2022-01-01
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30