사서함 또는 할당량 제한의 최대 크기를 가져 오려고합니다. 실제로 사서함의 여유 공간을 찾습니다. 그래서 나는 사용 된 공간과 최대 공간을 찾고 그 다음에 자유 공간을 찾기 위해 차이를 찾고 있습니다.C# EWS Managed API : 사서함 최대 크기 또는 할당량 제한을 얻는 방법
폴더에 사용 된 크기를 찾기 위해 아래 코드가 있습니다. 나는 전체 크기로 모든 폴더를 반복 할 수 있다고 생각합니다. 하지만 최대 할당량 한도는 어떻게 조정합니까?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Exchange.WebServices.Data;
namespace ConsoleApplication12
{
class Program
{
static void Main(string[] args)
{
ExchangeService service = new ExchangeService();
service.Credentials = new WebCredentials("mail", "pass");
service.Url = new Uri("https://outlook.office365.com/EWS/Exchange.asmx");
ExtendedPropertyDefinition PR_Extended_Message_Size = new ExtendedPropertyDefinition(3592, MapiPropertyType.Long);
PropertySet psPropertySet = new PropertySet(BasePropertySet.FirstClassProperties) { PR_Extended_Message_Size };
Folder Inbox = Folder.Bind(service, WellKnownFolderName.Inbox, psPropertySet);
long FolderSize = 0;
if (Inbox.TryGetProperty(PR_Extended_Message_Size, out FolderSize))
{
Console.WriteLine(FolderSize/1024);
}
Console.ReadKey();
}
}
}
extended_message_size를 쿼리하는 것처럼 쿼리 할 수 있어야합니다. 여기서 할당량에 대한 MAPI 속성 상수를 찾으십시오. https://blogs.technet.microsoft.com/outlooking/2013/09/19/mailbox-quota-in-outlook-2010-general-information-and-troubleshooting-tips/ – dlatikay