hi
each message has a entryid but it isn't available in message properties. how can get it?
OutlookFile olf = new OutlookFile(@"input.pst");
OutlookFolderCollection outlookFolderCollection = olf.RootOutlookFolder.GetSubFolders();
byte[] entryIds = null;
foreach (OutlookFolder folder in outlookFolderCollection)
{
entryIds = folder.EntryId;
}
for(int i = 0; i<entryIds.Length; i++)
{
Console.WriteLine(entryIds[i]);
}
Console.ReadLine();
Sylvaran wrote:Hello. Has this been implemented? I see OutlookFolder objects have a RemoveItem method that takes a byte[] entry id as an argument, but I don't know how to get that for the message in question. The only ID I see in properties for OutlookItem is an internet message ID string, and while I haven't tried it I assume that would not work even if I convert to byte array.
Sylvaran wrote:Ah well. Just out of curiosity then, is there any way to use the RemoveItem method then? Maybe some other method I am not aware of?
string pstfile = @"../../data/from_Amy.pst";
OutlookFile outlookFile = new OutlookFile(pstfile);
OutlookFolderCollection ofc = outlookFile.RootOutlookFolder.GetSubFolders();
OutlookFolder folder = ofc[1].GetSubFolder("From_Amy");
IEnumerable<OutlookItem> items = folder.EnumerateOutlookItem();
OutlookFolder NewFolder = outlookFile.RootOutlookFolder.AddFolder("NewFolder");
foreach (var item in items)
{
//Add the undeleted OutlookItem that to new folder
NewFolder.AddItem(item);
}
//Romve the old OutlookFolder
ofc.Remove(folder);
Abel.He wrote:Hello,
Thanks for your feedback.
After further investigation, I did the issue you mentioned, accroding to the feedback from our development team, Spire.Emial don’t support folder currently. And I have logged it as a new function into our product updating system with the ticket number SPIREEMAIL-71. Our development team will achieve it. Once it is achieved, I will inform you in time. Sorry for the inconvenience caused.
Sincerely
Abel
E-iceblue support team