I would like to get all mails in outlook from a specific folder:
My folder structure:
I find this Code to get all mails in outlook inbox folder (not the inbox in picture!):
Outlook.Application oApp;
Outlook._NameSpace oNS;
Outlook.MAPIFolder oFolder;
Outlook._Explorer oExp;
oApp = new Outlook.Application();
oNS = (Outlook._NameSpace)oApp.GetNamespace("MAPI");
oFolder = oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox);
oExp = oFolder.GetExplorer(false);
oNS.Logon(Missing.Value, Missing.Value, false, true);
Outlook.Items items = oFolder.Items;
foreach (Outlook.MailItem mail in items)
{
//do someting
}
Can someone tell me how to get all mails from a specific folder (like: wolfy-server)?