I'm new with C# and i'm making one *.exe that have to search emails with a specific subject in my Exchange.
For Inbox and Other Folders i use the code bellow (with no problems):
FindFoldersResults allEmailFolders_Inbox = service.FindFolders(WellKnownFolderName.Inbox, new FolderView(int.MaxValue) { Traversal = FolderTraversal.Shallow });
FindFoldersResults allEmailFolders = service.FindFolders(WellKnownFolderName.Inbox, new FolderView(int.MaxValue) { Traversal = FolderTraversal.Deep });
Now i'm trying to search inside Sent Item Folder, but don't return me results. If i make a new folder inside SentItems the email apeears, but inside Sent items no. I try the code bellow:
FindFoldersResults allEmailFolders_Sent = service.FindFolders(WellKnownFolderName.SentItems, new FolderView(int.MaxValue){Traversal=FolderTraversal.Deep});
FindFoldersResults allEmailFolders_Sent = service.FindFolders(WellKnownFolderName.SentItems, new FolderView(int.MaxValue){Traversal=FolderTraversal.Shallw});
Can someone help me?