最佳的Exchange .NET開發 Exchange API
阿新 • • 發佈:2019-01-01
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;
}
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;
}