不使用 Outlook Interop 发送 Outlook/Exchange 任务请求
我正在寻找一种在不使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 EWS 托管 API,因为它不依赖于 Outlook Interop 或已安装或正在运行的 Outlook 实例。
如果您通过用户身份验证(可能需要模拟或拥有用户凭据),您可以简单地为他/她创建任务:
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: