簡體   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