本文介绍了如何在sharepoint 2007中显示当前用户的收件箱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我发现此Web部件用于Exchange 2003,但是即使在用户登录后,在Exchange 2007中,Web部件仍显示Exchange 2007 owa登录页面(而不是当前用户收件箱).
I found this web part for Exchange 2003, but in exchange 2007 even after user login, web part shows exchange 2007 owa login page (instead of current user inbox).
如何在moss 2007中显示当前用户的Exchange 2007收件箱?有想法吗?
How I can show current user's exchange 2007 inbox in moss 2007? Any Idea?
推荐答案
解决方案是围绕开箱即用的OWA Webpart创建一个包装Webpart,并使用当前登录的用户的电子邮件地址访问该收件箱.
The solution is to create a wrapper webpart around the out of the box OWA webpart and have that access the inbox by using the currently logged in user's emailaddress.
这是代码
P.S. (请注意,Web访问的地址已在此处的应用程序设置中设置!)
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);
}
}
}
这篇关于如何在sharepoint 2007中显示当前用户的收件箱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!