1. 程式人生 > >最佳的Exchange .NET開發 Exchange API

最佳的Exchange .NET開發 Exchange API

GetFolderType request = new GetFolderType();
request.FolderShape = new FolderResponseShapeType();
request.FolderShape.BaseShape = DefaultShapeNamesType.AllProperties;
DistinguishedFolderIdType inboxId = new DistinguishedFolderIdType();
inboxId.Id = DistinguishedFolderIdNameType.inbox;
request.FolderIds = new BaseFolderIdType[] { inboxId };
GetFolderResponseType response = serviceBinding.GetFolder(request);
FolderInfoResponseMessageType responseMessage
= response.ResponseMessages.Items[0] as FolderInfoResponseMessageType;
if (responseMessage.ResponseClass == ResponseClassType.Success)
{
FolderType inbox = responseMessage.Folders[0] as FolderType;
}