S
Steve Lloyd
Hi,
I am trying to get someones email address out of the win 2003 server
Directory using there logon name and the following code.
Dim DSEntry As New System.DirectoryServices.DirectoryEntry("LDAP:" &
System.Environment.GetEnvironmentVariable("LOGONSERVER") & "/CN=" &
System.Enviroment.Username & ",CN=Users,DC=laxeypartners,DC=com")
EmailAddress = DSEntry.Properties("mail").Value.ToString()
However, for some users the directory display name is not the same as the
logon name. e.g. Directory name is John Smith and logon name is
John.Smith.
When I use the logon name in the above code it does not find an entry in the
directory.
Does anyone know of a method that i can use to extract the default email
address from the logon name.
Many thanks,
Steve Lloyd
I am trying to get someones email address out of the win 2003 server
Directory using there logon name and the following code.
Dim DSEntry As New System.DirectoryServices.DirectoryEntry("LDAP:" &
System.Environment.GetEnvironmentVariable("LOGONSERVER") & "/CN=" &
System.Enviroment.Username & ",CN=Users,DC=laxeypartners,DC=com")
EmailAddress = DSEntry.Properties("mail").Value.ToString()
However, for some users the directory display name is not the same as the
logon name. e.g. Directory name is John Smith and logon name is
John.Smith.
When I use the logon name in the above code it does not find an entry in the
directory.
Does anyone know of a method that i can use to extract the default email
address from the logon name.
Many thanks,
Steve Lloyd