Integrate code in MDaemon to OA system

xiaoxiao2021-03-06  57

<% '*************************************** ************************************ ** Integrate the code in MDaemon to OA system ** '** author: enjoy Contact: aenjoy@126.com QQ: 15159174 **' ** 2004-7-29 ** '******************** ***************************************************************** IF SESSION ("PCBH") <> "" THEN DIM USER, Password, Domainuser = session ("PCBH") Password = SESSION ("PCMM") Domain = "sohu.com" set rs1 = server.createObject ("AdoDb.Recordset" SQL1 = "SELECT DOMAINID from Domains WHERE DOMAINNAME = '" & Domain & "" RS1.Open SQL1, CONN, 1, 1 DomainID = RS1 ("DomainID") SET RS = Server.createObject ("AdoDb.Recordset") SQL = " Select * from userlist where mailbox = '"& user &" "rs.open SQL, CONN, 1, 3' ********************************** ************************************* If there is no user's mailbox Just create, here you need to create a mailbox folder and a user account '************************************************* ********************************* If rs.eof the Dim Road 'Physical Path ROAD = "C: / MDaemon / Users / "& Domain S ET fso = server.createObject ("scripting.filesystemObject") if not (fso.folderexists) THEN SET f = fso.createfolder (Road "/" user) end if set fso = nothing sql = "

insert into UserList (Mailbox, FullName, MailDir, Password, AutoDecode, IsForwarding, AllowAccess, AllowChangeViaEmail, KeepForwardedMail, HideFromEveryone, EncryptMail, ApplyQuotas, EnableMultiPop, CanModifyGAB, CalendarOnly, MaxMessageCount, MaxDiskSpace, DomainID) values ​​( ' "& user &"', ' " & session ("PCXM") & "','" & Road & "','" & Password & ", 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0," & Domainid & ")" Conn.execute (SQL) end ifcall closeconn () rs.closset = nothingrs1.closset = Nothing '********************************** ******************************************* The jump to the mailbox, No need to log in '****************************************************** ********************* Response.Redirect "http://192.168.0.216:3000/worldClient.dll?View=main&user="

; & User & "& password =" & password IF%>

转载请注明原文地址:https://www.9cbs.com/read-73674.html

New Post(0)