从网站上使用 Outlook 打开现有电子邮件
我们正在将一些电子邮件从 Exchange 服务器的特定收件箱保存到某种跟踪系统中。用户使用浏览器查看该跟踪系统。
我现在想做的是在网页上生成一个链接,当然可以在客户端上的 Outlook 2010 中打开现有电子邮件。
为了生成此链接,我拥有电子邮件/项目的所有必要信息(使用 Microsoft.Exchange.WebServices)。
那么如何做到这一点呢?
好的,到目前为止我所拥有的: 将 Exchange 服务器上的 ewsId(Exchange 服务器上邮件的 ID)转换为 Outlook 的 EntryID。这是通过使用 EWS 的 ConvertId 方法来完成的。
现在我遇到的问题是,当我尝试使用 Outlook 加载邮件时,出现错误“无法打开元素。请重试”。
We are saving some Emails from a specific Inbox of an Exchange Server to some kind of tracking system. User look at this tracking system by using the browser.
What I am trying to do now is to generate a link on a webpage which opens an existing email in Outlook 2010 on the client of course.
To generate this link I have all necessary information of the email/item (using Microsoft.Exchange.WebServices).
So how to do that?
ok what i have so far:
convert the ewsId (id of the mail on exchange server) from exchange server to entryid of outlook. this is done by using the ConvertId method of EWS.
now i have the problem that when i try to load the mail with outlook i get an error "element could not be opened. try again".
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好的,我找到了一个解决方案,在这里发布我的代码:
在服务器端(带有交换Web服务的c#):
在客户端(Internet Explorer,安装了Outlook,vbscript):
ok i found a solution an post my code here:
on the serverside (c# with exchange webservice):
on the client side (Internet explorer, Outlook installed, vbscript):
你好,我认为这会对你有帮助
基本上有三种方法可以做到这一点。
mailto
打开 Outlook 应用程序使用Mailto Link
这是一种很俗气的方法。将属性与 mailto 一起传递,
但是如果您想在 VB.Net LinkLabel 中使用它。您可以通过这种方式
使用 SMTP 发送邮件
在开始编码之前,请确保导入相关的命名空间
这是代码
看起来不错,但上述两种方法的限制是您无法发送附件。如果用户想要访问 Outlook 地址簿并向邮件发送附件怎么办?
使用 MSOutlook 对象库
下面是一小段使用 MS Outlook 对象库将 Outlook 与 VB.Net 集成的代码。
右键单击解决方案资源管理器中的“引用”。添加“Microsoft Outlook 10.0 对象库”。
公共函数 OutlookCall()
'以 Outlook 应用程序为例
将 oOutlook 调暗为新 Outlook.Application()
结束函数
您可以使用此 Outlook 对象执行许多其他功能。希望这有帮助。
注意:
这个vl对你有帮助
Hi I think This Will help U
Basically there are three ways of doing this.
mailto
to open the outlook ApplicationUsing Mailto Link
This is a cheesy way of doing it. Pass the attributes along with the mailto
However if you want to use this in a VB.Net LinkLabel. You can do it this way
Using SMTP Send Mail
Before you start coding make sure you import the related namespace
Here goes the code
Looks good, but the limitation with the above two methods is you cannot send an attachment. What if the user wants to access the outlook address book and also send the mail an attachment?
Using MSOutlook Object Library
Here’s a small piece of code for outlook integration with VB.Net using MS Outlook object Library.
Right click on the References in the Solution Explorer. Add “Microsoft Outlook 10.0 Object Library”.
public Function OutlookCall()
'Take an instance of the Outlook App
Dim oOutlook As New Outlook.Application()
End Function
There are a lot of other features you can do with this outlook object. Hope this helps.
Note:
this vl help u