如何使用 folderId 查找邮箱的文件夹路径?
How to find folder path of a mailbox using folderId?
我有邮箱中文件夹的 folderId 属性。如何使用 EWS 找到文件夹的完整路径?
您可以使用 PR_FOLDER_PATHNAME
扩展 属性 ,其中应包含完整路径。示例:
ExtendedPropertyDefinition FolderPath = new ExtendedPropertyDefinition(0x66B5, MapiPropertyType.String);
PropertySet psset1 = new PropertySet(BasePropertySet.FirstClassProperties);
psset1.Add(FolderPath);
Folder FolderwithPath = Folder.Bind(service, WellKnownFolderName.Inbox, psset1);
Object FolderPathVal = null;
if (FolderwithPath.TryGetProperty(FolderPath,out FolderPathVal))
{
Console.WriteLine(FolderPathVal);
}
我有邮箱中文件夹的 folderId 属性。如何使用 EWS 找到文件夹的完整路径?
您可以使用 PR_FOLDER_PATHNAME
扩展 属性 ,其中应包含完整路径。示例:
ExtendedPropertyDefinition FolderPath = new ExtendedPropertyDefinition(0x66B5, MapiPropertyType.String);
PropertySet psset1 = new PropertySet(BasePropertySet.FirstClassProperties);
psset1.Add(FolderPath);
Folder FolderwithPath = Folder.Bind(service, WellKnownFolderName.Inbox, psset1);
Object FolderPathVal = null;
if (FolderwithPath.TryGetProperty(FolderPath,out FolderPathVal))
{
Console.WriteLine(FolderPathVal);
}