How to get mail addresses of the user (SMTP-addresses)

D

derSchlichter

Hello,

I must find the following information out from a VB6-AddIn (Outloo
2000/XP/2003 - optional with Exchange or Standalone):

All SMTP-mail-addresses which the current user can access. Thi
includes his own addresses and the addresses of the users he is
representant of.

Up till now I work with this:


Code
-------------------

Set CurrentUser = MyOffice.GetNamespace("MAPI").CurrentUser
'
If Not CurrentUser Is Nothing Then
If CurrentUser.Address <> "Unknown" Then
If InStr(1, CurrentUser.Address, "/o=") > 0 Then
' EXCHANGE CONNECTED!!!
ID = CurrentUser.EntryID
Set objSession = CreateObject("MAPI.Session")
objSession.Logon "", "", False, False
Adresse = objSession.GetAddressEntry(ID).Fields(&H39FE001E).Value
ExName = objSession.GetAddressEntry(ID).Fields(&H3001001E).Value
Set objSession = Nothing
Else
' OUTLOOK STANDALONE!!!!!
Adresse = CurrentUser.Address
ExName = ""
End If
End If
End If
Set CurrentUser = Nothing

-------------------

I receive the SMTP address ([email protected]) in -Adresse- and unde
-ExName- the Exchange user name. Unfortunately, I receive no *mor
addresses* and also not *the representatives*. What else can I do?

Hope my english is not too bad to understand my question...

Volke
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top