Exchange server name from Outlook application

  • Thread starter Thread starter Srini
  • Start date Start date
S

Srini

Hi,

I need to get the details about the exchange server name, email
address, username and password from the outlook, which is already
configured. Is it possible to retrieve those values in C#?

I tried using the following code

Outlook.Application objOutlook = new
Outlook.Application();
// Get items in my inbox.
NameSpace outlookNS = objOutlook.GetNamespace("MAPI");
outlookNS.CurrentUser.Address gives me the AD user name.

Can anyone help me to get the other values?

Thanks in advance
Srini
 
Hello,

I don't think the Outlook object model exposes these properties.

You'll have to take a look at Active Directory itself, or use MAPI to access
the underlying store directly.

However, you won't get the password from there...

What are you trying to accomplish? Perhaps there are better ways to do this.

Best regards,
Henning Krause
 
Hi,

I am creating an application, which gets the details from the outlook
and transfers the same to Windows mobile.
I know activesync can be used. But when I use activesync, I need to
enter all the details on my own.

Please let me know what are the other ways to accomplish this task.

Thanks and Regards
Srinivasan
 
Thanks for your reply. Actually I need to get those details and
transfer it to Pocket PC(Windows mobile).
I know through Activesync, we can do the same thing. But we need to
enter the details in the ActiveSync.

Please let me know, what are the other ways to accomplish it? Do I
need to use, ActiveDs??

I have not worked in ActiveDS. Please let me know.

Thanks
Srini
 
Exchange server name: outlookNS.ExchangeMailboxServerName

Current user name: outlookNS.CurrentUser.Name Current user address:
outlooksNS.CurrentUser.Address



I don't believe there's a way to access the user's password.
 
Back
Top