繁体   English   中英

我如何将Outlook Web App嵌入我的网站?

[英]How i can embed Outlook Web App into my site?

我想将Outlook Web App嵌入到我的网站中。 在我的网站页面上直接显示日历,邮件,人物屏幕。 我试图通过iFrame来做,但它是被禁止的。 有可能吗?

与普遍看法相反,这是可以实现的。

我的博文中有更多细节( http://blog.degree.no/2013/06/owa-in-iframe-yes-its-possible/ ),但这里是需要的代码。 如果你在“轻量级模式”(flag = 1)中运行它,则问题较少,它可以跨域运行,但如果你在同一个域内运行它(例如在yourdomain.com上运行的网站,你的交换服务器在邮件上运行)。 yourdomain.com)它也适用于“完整模式”(flag = 0):

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
</head>

<script>
    function LoginToOWA(server, domain, username, password) {


        var url = "https://" + server + "/owa/auth/owaauth.dll";
        // flags 0 = full version, flags 1 = light weight mode
        var p = { destination: 'https://' + server + '/exchange', flags: '1', forcedownlevel: '0', trusted: '0', isutf8: '1', username: domain + '\\' + username, password: password };


        var myForm = document.createElement("form");
        myForm.method = "post";
        myForm.action = url;

        for (var k in p) {

            var myInput = document.createElement("input");
            myInput.setAttribute("name", k);
            myInput.setAttribute("value", p[k]);
            myForm.appendChild(myInput);
        }


        document.body.appendChild(myForm);
        myForm.submit();
        document.body.removeChild(myForm);
    }
</script>


<body onload="javascript:LoginToOWA('mail.someserver.com','yourdomain','yourusername@someserver.com','yourpassword');">
    <img src="../../gfx/loadingAnim.gif" /> Please wait while your inbox is loading... 
</body>
</html>

你有哪个版本的OWA? 我之前在OWA-2003上为我们公司的内部网做过这个。 只需将您的iframe指向webpart网址,如下所示:

http://server/exchange/user/inbox/?cmd=contents&view=Two-Line%20View&theme=4

仅当您的主网站使用Windows集成身份验证时,此功能才有效。 您必须使用ASP.Net服务器端代码将“user”替换为登录用户名。

在MS KB文章中搜索webpart参数。 您可以显示收件箱,日历等。

暂无
暂无

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

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