My problem is that the email inbox that I am trying to access is not my default inbox.
There is a mail account that receives emails from a reporting site. The email account is "MonthlySales".
I thought that I could just log into the server with a different session:
Expand|Select|Wrap|Line Numbers
- profileInfo = (object)string.Format("{0}\n{1}", MailServer, UserName);
- ns.Logon(profileInfo, Missing.Value, false, true);
- string name = ns.CurrentUser.Name;
- inboxFolder = ns.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox);
- Username and MailServer are correct.
- profileInfo is correct
- ns.Logon(...) runs without error...
- "name" still shows MY logged in username
- "inboxFolder" still points to MY local inbox folder.
How do I log into the "MonthlySales" email account so that I can access it programatically?