|
 |
asp_cdo thread: Problems on Creating a New Mailbox through the web
Message #1 by "Monster" <monster_rl@y...> on Sun, 3 Mar 2002 15:27:50
|
|
Dear all,
Please help me.
I have got a problem on creating a new mail box on an Exchange 2000 Server
by using ASP and CDO.
Following are my part of codes which generate problems :
Dim prsmbx
Dim mbx
Dim strFirstName
Dim strLastName
Dim strAlias
Dim strLDAP
strFirstName = "monster"
strLastName = "mo"
strAlias = strFirstName & Left(strLastName, 2)
set prsmbx = Server.CreateObject("CDO.Person")
Set mbx = prsmbx.GetInterface("IMailboxStore")
strLDAP = "LDAP://127.0.0.1/cn=" & strFristName & " " & strLastName
strLDAP = strLDAP & ", ou=recipients, dc=email, dc=das, dc=com, dc=dns"
with prsmbx
.FirstName = strFirstName
.LastName = strLastName
.Fields("userAccountControl") = ADS_UF_NORMAL_ACCOUNT
.Fields.Update
.DataSource.SaveTo strLDAP
End With
------------------------------------------------------------------
Error Type :(0x8007202B)
.DataSource.SaveTo StrLDAP
------------------------------------------------------------------
Is that the problem of the LDAP string ??
How can i fix the problem ?
How can i find out a correct LDAP for the creating a new account ?
Best Regards,
monster
Message #2 by "Siegfried Weber" <sweber@c...> on Wed, 6 Mar 2002 08:33:14 +0100
|
|
Check http://www.cdolive.net/download/adusermanagement.zip for a bunch
of WSH sample scripts. Shouldn't be hard to cut & paste the code out you
need and give you a pointer.
<Siegfried />
> -----Original Message-----
> From: Monster [mailto:monster_rl@y...]
> Sent: Sunday, March 03, 2002 4:28 PM
> To: ASP CDO
> Subject: [asp_cdo] Problems on Creating a New Mailbox through the web
>
> Dear all,
>
> Please help me.
>
> I have got a problem on creating a new mail box on an Exchange 2000
Server
> by using ASP and CDO.
> Following are my part of codes which generate problems :
>
> Dim prsmbx
> Dim mbx
> Dim strFirstName
> Dim strLastName
> Dim strAlias
> Dim strLDAP
>
> strFirstName =3D "monster"
> strLastName =3D "mo"
> strAlias =3D strFirstName & Left(strLastName, 2)
>
>
> set prsmbx =3D Server.CreateObject("CDO.Person")
> Set mbx =3D prsmbx.GetInterface("IMailboxStore")
>
> strLDAP =3D "LDAP://127.0.0.1/cn=3D" & strFristName & " " &
strLastName
> strLDAP =3D strLDAP & ", ou=3Drecipients, dc=3Demail, dc=3Ddas,
dc=3Dcom,
dc=3Ddns"
> with prsmbx
> .FirstName =3D strFirstName
> .LastName =3D strLastName
> .Fields("userAccountControl") =3D ADS_UF_NORMAL_ACCOUNT
> .Fields.Update
> .DataSource.SaveTo strLDAP
> End With
>
> ------------------------------------------------------------------
> Error Type :(0x8007202B)
> .DataSource.SaveTo StrLDAP
> ------------------------------------------------------------------
>
>
> Is that the problem of the LDAP string ??
> How can i fix the problem ?
> How can i find out a correct LDAP for the creating a new account ?
>
> Best Regards,
>
> monster
>
$subst('Email.Unsub').
Message #3 by "Monster" <monster_rl@y...> on Thu, 7 Mar 2002 16:57:33
|
|
I LOVE U @_@
It really can DO THAT !!!~~~~
THANX~~~~~~~~~~~
|
|
 |