Regd:Mail quota retrieval

  • From: "Chintan" <chintankathiriya@xxxxxxxxx>
  • To: exchangelist@xxxxxxxxxxxxx
  • Date: Fri, 15 Apr 2005 17:47:18 -0600

Can Any suggest me how i can retrieve mail-quota,mail-usage,email address
for a particular user in ms exchange server. I have retrieved the email
address of a particular user but dont have idea how to retrieve other
info. here is my code to retrieve email of a particular 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 "Active Directory Provider"
Set Com = CreateObject("ADODB.Command")
Set Com.ActiveConnection = con
Com.CommandText ="select mail FROM 'LDAP://"+objADsPath+";' where
Set rs = Com.Execute

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


Other related posts: