简体   繁体   English

在不使用 Outlook 互操作的情况下发送 Outlook / Exchange 任务请求

[英]Sending Outlook / Exchange Task Request using without Outlook Interop

I am looking for a way to send an Exchange Task Request without using the Outlook Interop.我正在寻找一种在不使用 Outlook 互操作的情况下发送 Exchange 任务请求的方法。 Ideally something using SMTP, but I understand that's likely not possible.理想情况下使用 SMTP,但我知道这可能是不可能的。 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("example@example.com", "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("aaa@example.com")
RecipAssign.Type = 1
Task.To = "aaa@example.com"
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.我对使用离线 Outlook 发送任务的答案感兴趣,但如果不使用 Outlook 互操作,我似乎无法让任务与 Redemption 一起使用。

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). 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).

You can use EWS Managed API because it does not depend on Outlook Interop or installed or working Outlook instance.您可以使用 EWS 托管 API,因为它不依赖于 Outlook 互操作或安装或工作 Outlook 实例。

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);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM