不使用 Outlook Interop 发送 Outlook/Exchange 任务请求

发布于 2024-11-13 17:10:46 字数 1405 浏览 2 评论 0原文

我正在寻找一种在不使用 Outlook Interop 的情况下发送 Exchange 任务请求的方法。理想情况下使用 SMTP,但我知道这可能是不可能的。我尝试了很多解决方案,但它们似乎都成功了,但任务请求从未到达另一个邮箱。

即使不抛出错误,兑换代码也不起作用:

Dim rSession As New Redemption.RDOSession
rSession.LogonExchangeMailbox("[email protected]", "exchange.example.com")

Dim Task As Redemption.RDOTaskItem = CType(rSession.GetDefaultFolder(Redemption.rdoDefaultFolders.olFolderTasks).Items.Add, Redemption.RDOTaskItem)
Task.Subject = "Test Redemption Task 22"
Task.Body = "Test Task Body"
Task.StartDate = #5/1/2010#
Task.Assign()

Dim RecipAssign As Redemption.RDORecipient
RecipAssign = Task.Recipients.Add("[email protected]")
RecipAssign.Type = 1
Task.To = "[email protected]"
Task.Recipients.ResolveAll()
Task.Send()

我对 使用脱机 Outlook 发送任务,但如果不使用 Outlook Interop,我似乎无法让任务与 Redemption 一起使用。

我已经为此花费了几天时间,正在寻找一个工作代码示例,以便使用 SMTP 或 Redemption(没有 Outlook Interop)或 Exchange Web Services(托管 API 或非托管 API)为其他用户生成任务请求。

I am looking for a way to send an Exchange Task Request without using the Outlook Interop. Ideally something using SMTP, but I understand that's likely not possible. I have tried many solutions but they all seem to succeed but the task request never arrives in the other mailbox.

Redemption code that doesn't work even though it doesn't throw an error:

Dim rSession As New Redemption.RDOSession
rSession.LogonExchangeMailbox("[email protected]", "exchange.example.com")

Dim Task As Redemption.RDOTaskItem = CType(rSession.GetDefaultFolder(Redemption.rdoDefaultFolders.olFolderTasks).Items.Add, Redemption.RDOTaskItem)
Task.Subject = "Test Redemption Task 22"
Task.Body = "Test Task Body"
Task.StartDate = #5/1/2010#
Task.Assign()

Dim RecipAssign As Redemption.RDORecipient
RecipAssign = Task.Recipients.Add("[email protected]")
RecipAssign.Type = 1
Task.To = "[email protected]"
Task.Recipients.ResolveAll()
Task.Send()

I am interested in the answer on Sending Tasks using an offline Outlook but I cannot seem to get tasks to work with Redemption without using the Outlook Interop.

Having spent days already on this, I'm looking for a working code sample to generate task requests for other users using SMTP or Redemption (without the Outlook Interop) or Exchange Web Services (managed API or not).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

穿越时光隧道 2024-11-20 17:10:46

您可以使用 EWS 托管 API,因为它不依赖于 Outlook Interop 或已安装或正在运行的 Outlook 实例。

如果您通过用户身份验证(可能需要模拟或拥有用户凭据),您可以简单地为他/她创建任务:

var task = new Task(service){Subject = "simple task"};
task.Save(WellKnownFolderNames.Tasks);

You can use EWS Managed API because it does not depend on Outlook Interop or installed or working Outlook instance.

If you are authenticated as a user (which can require Impersonation or having user's credentials) you can create task for him/her simply with:

var task = new Task(service){Subject = "simple task"};
task.Save(WellKnownFolderNames.Tasks);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文