通过网页Outlook电子邮件 [英] Outlook Email via a Webpage

查看:119
本文介绍了通过网页Outlook电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有是在我公司的内联网运行ASP.net和C#开发的Web应用程序。因为所有为这个应用程序的用户都在使用Microsoft Outlook无一例外,我想为应用程序打开Outlook邮件的客户端。 据我所知,办公室被设计为在桌面上,而不是从服务器上运行,但是我有麻烦创建在客户端的Word或Excel文档。

I have a web application developed with ASP.net and C# that is running on my companies' intranet. Because all the users for this application are all using Microsoft Outlook without exception, I would like for the the application to open up an Outlook message on the client-side. I understand that Office is designed to be run on the desktop and not from a server, however I have no trouble creating a Word or Excel document on the client-side.

我有code实例化使用安装在服务器上的Microsoft.Office.Interop.Outlook命名空间和Outlook中的Outlook对象。当我尝试从服务器运行code,我得到指出机器默认权限设置不授予本地激活权限与CLSID {000C101C-0000-0000- COM服务器应用程序中的DCOM源错误信息C000-000000000046}用户此安全权限可以使用组件服务管理工具进行修改。我已经修改使用组件服务工具的​​权限,但仍然得到同样的错误。

I have code that instantiates the Outlook object using the Microsoft.Office.Interop.Outlook namespace and Outlook installed on the server. When I try to run the code from the server, I get a DCOM source error message that states "The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID {000C101C-0000-0000-C000-000000000046} to the user This security permission can be modified using the Component Services administrative tool." I have modified the permissions using the Component Services tool, but still get this same error.

有没有办法解决这个或者这是徒劳的练习,因为Outlook无法从服务器端code?

Is there a way to overcome this or is this a fruitless exercise because Outlook cannot be opened on the client side from the server-side code?

邮寄地址将不会由于极端长度,该电子邮件可以获取工作。此外,发送它的用户需要养眼添加到文本的收件人。

Mailto will not work due to the extreme length that the emails can obtain. Also, the user that sends it needs add in eye-candy to the text for the recipients.

推荐答案

您不能打开的东西在客户端从服务器端code。你不得不使用脚本在页面上做你想要什么(或者别的客户端如ActiveX或嵌入.NET或东西)

You cannot open something on the client from server side code. You'd have to use script on the page to do what you're wanting (or something else client-side like ActiveX or embedded .NET or something)

下面是从网页调用一个Outlook的MailItem样本的JavaScript。所以它执行在客户机上这可以很容易地注入到页从服务器端code。

Here's a sample Javascript that invokes an Outlook MailItem from an webpage. This could easily be injected into the page from your server-side code so it executes on the client.

HTTP://www.$c$cproject.com/KB/ ASPNET / EmailUsingJavascript.aspx

这篇关于通过网页Outlook电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆