回答

0

的解決方案是創建圍繞開箱OWA web部件的包裝的WebPart,並有通過使用當前登錄的用戶的訪問EMAILADDRESS的收件箱。

下面的代碼

附:(注意WebAccess的地址在AppSettings的設置在這裏!)

using System; 
using System.Configuration; 
using System.Web.UI.WebControls; 
using System.Web.UI.WebControls.WebParts; 
using Microsoft.SharePoint; 
using Microsoft.SharePoint.Portal.WebControls; 

namespace DCubed.SharePoint.WeParts 
{ 
    /// <summary> 
    /// Wrapper around the My Inbox WebPart 
    /// </summary> 
    public class MyInboxEx : WebPart 
    { 
    /// <summary> 
    /// Called by the ASP.NET page framework to notify server controls that use  composition-based implementation to create any child controls they contain in preparation for posting back or rendering. 
    /// </summary> 
    protected override void CreateChildControls() 
    { 
     // Create the instance of My Inbox Web Part 
     var inbox = new OWAInboxPart 
     { 
     MailboxName = SPContext.Current.Web.CurrentUser.Email, 
     OWAServerAddressRoot = ConfigurationManager.AppSettings["MailServer"] 
     }; 
     Controls.Add(inbox); 
    } 
    } 
} 
相關問題