Решение состоит в том, чтобы создать веб-часть обертки вокруг веб-части OWA, входящей в комплект поставки, и получить доступ к папке «Входящие», используя зарегистрированный в настоящее время адрес электронной почты пользователя.
Вот код
P.S.(обратите внимание, что адрес 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);
}
}
}