Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading Email Addresses from Active Directory 2

Status
Not open for further replies.

WIREMESH

Programmer
Mar 15, 2004
109
US
thread184-967331 asked the original question. I need an answer.
I want to store the users email address in my OWN table.

Using code from another thread, I ge most of the info I need:

lc_domain = "DOMAIN"
lc_primary_domain_controller = Getobject("WinNT://" + lc_domain)

For Each User In lc_primary_domain_controller

IF User.Class = 'User'
Insert INTO &lc_cursor (username,fullname,descr,Class,;
accdisable,acclocked,profile, loginscrpt,Homedir) ;
Values (User.Name,user.fullname,User.description,User.Class,User.AccountDisabled,;
User.IsAccountLocked,User.Profile,User.loginscript,User.Homedirectory)
ENDIF

Next


How can I modify this code to get the users email address info. Assume they have exchange server.
 
Wiremesh,
It is not clear how/where you have the E-mail adress informatin you would like to convert to a FoxPro table.
Outlook / OutlookExpress / other mailprogramm?
Regards,
Jockey2
 
I am using Outlook. assume there is a field called emailaddr c(100) in my cursor.
 
Do you have an LDAP example that will accomplish this? What are the limitations?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top