I need to login to a specific profile, not the default one
Microsoft.Office.Interop.Outlook.Application oApp = new Microsoft.Office.Interop.Outlook.Application(); Microsoft.Office.Interop.Outlook.MAPIFolder inboxFolder = null; oApp = new Microsoft.Office.Interop.Outlook.Application(); oApp.Session.Logon("[email protected]", "*******", false, true); Microsoft.Office.Interop.Outlook.NameSpace oNS = oApp.GetNamespace("MAPI"); inboxFolder=oNS.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderInbox);
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Bikesh SrivastavaRank #108 · 20.3K reputationPosted Dec 12, 2016, 2:11 AM EST