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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

About Mail Quata retrieval from MS Exchange server

Status
Not open for further replies.

usctrojan

Programmer
Apr 15, 2005
4
0
0
US
Hello,
I am trying to retrieve mail-quata,mail-usage,waring and email address from MS Exchange Server. Uptil now i am able to retrieve only email address of perticular user. Now i want to retrieve his mail-quata,mail-usage and warning(warning means if warning= -10 and mail-quata is 60 MB then i want to give warning on 50 MB of mail-usage..)

Here is my code to retrieve email address of perticular user:
/*---------------------------------------------------------*/
Option Explicit
Dim strUsername,strUsernamea,strpassword,con,rs,Com,objADsPath,objDomain

Set objDomain = GetObject ("GC://rootDSE")
objADsPath = objDomain.Get("defaultNamingContext")
Set objDomain = Nothing
Set con = CreateObject("ADODB.Connection")
con.provider ="ADsDSOObject"
'con.Properties("User ID") = "BURLINGTON\"+strUsername
'con.Properties("Password") = strpassword
con.open "Active Directory Provider"
Set Com = CreateObject("ADODB.Command")
Set Com.ActiveConnection = con
Com.CommandText ="select mail FROM 'LDAP://"+objADsPath+"' where sAMAccountName='vsavalia'"
Set rs = Com.Execute

msgbox rs("mail")
rs.Close
con.Close
Set rs = Nothing
Set con = Nothing


/*--------------------------------------------------------*/

Thanks,
Chintan

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top