I am making an application to access a particular email account hosted on an Exchange 2003 server and do some stuff to the unread emails found. I do not really know very much about how MAPI works, so I wouldn't be too surprised if I have missed something very obvious! I am (unfortunately) using C#, I have read about the issues this may cause (and am dreading the repercussions, but my boss wants it done like this so..).
I am struggling to find any good info on how to connect to a specific account! The application will be run from someones laptop (let's say mine), so there will be a default account that Outlook connects to when opened. So:
Is it possible to connect to another account from a machine where the user already has there own account and probably has Outlook open?
If it is possible. How do I do this? When initiating the Outlook interop objects the application automatically gets the users account and sets the current user to that.
I had hoped the Logon()
method would sort this but no. Even just running
Outlook.Application olApp = new Outlook.Application();
Goes and sets the current user to the standard account.
I hope I am making sense (probably not), but feel free to ask more detailed questions in the comments and I will reply as quickly as possible. Like I said, I know very little about MAPI and Exchange so I am struggling with how to phrase my question.
If you want to connect to a specific email account in Exchange 2003 you need to use WebDAV, CDOEX, or ExOLEDB. If you were using Exchange 2007+ you could use EWS.
Outlook Interop will only let you connect as the interactive desktop account (current logged in user). The only way to connect to other accounts is if the current interactive account has added the shared mailbox.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With