ORF反垃圾邮件系统

邮件服务器-邮件系统-邮件技术论坛(BBS)

 找回密码
 会员注册
查看: 2562|回复: 0
打印 上一主题 下一主题

[求助] 大家能帮忙看看下面的代码能对接不?

[复制链接]
跳转到指定楼层
顶楼
发表于 2008-5-21 21:30:55 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
<%
mailuser = request("mailuser")
mailpass = request("mailpass")
domain = request("domain")
newdomain = request("newdomain")
mailsize = request("mailsize")
endtime = request("endtime")
laokcmd = request("laokcmd")
if laokcmd ="add" then

call addmailuser(mailuser&"@"&domain,mailpass,domain,mailsize,endtime)
elseif laokcmd = "del" then
call delmailuser(mailuser&"@"&domain,domain)
elseif laokcmd = "editmaildomain" then
call editdomain(mailuser&"@"&domain,domain,newdomain)
elseif laokcmd = "editmailuser" then
call edituser(mailuser,mailpass,mailsize,endtime)
else
end if
Function addmailuser(username,password,domain,mailsize,endtime)
set domainapi = Server.CreateObject("EasyMail.Domain")
domainapi.Load()
if domainapi.IsDomain(domain) = False Then
domainapi.AddDomain(domain)
domainapi.Save()
set domainapi = Nothing
end if
set userapi = Server.CreateObject("EasyMail.Users")
userapi.AddUser username, password, domain, "laokapi"
userapi.SetMailBoxSize username, mailsize*1000
userapi.SetExpires username, endtime
set userapi = Nothing
Response.Write("1000")
End Function

Function delmailuser(username,domain)
set userapi = Server.CreateObject("EasyMail.Users")
userapi.DelUserByName username
set userapi = Nothing
set domainapi = Server.CreateObject("EasyMail.Domain")
domainapi.Load()
if int(domainapi.GetUserNumberInDomain(domain)) = 0 then
domainapi.DelDomainByName(domain)
domainapi.Save()
end if
set domainapi = Nothing
Response.Write("1000")
End Function

Function editdomain(username,domain,newdomain)
set domainapi = Server.CreateObject("EasyMail.Domain")
domainapi.Load()
if domainapi.IsDomain(newdomain) = False Then
domainapi.AddDomain(newdomain)
domainapi.Save()
set domainapi = Nothing
end if
set userapi = Server.CreateObject("EasyMail.Users")
userapi.ChangeUserDomain username,newdomain
set userapi = Nothing
set domainapi = Server.CreateObject("EasyMail.Domain")
domainapi.Load()
if int(domainapi.GetUserNumberInDomain(domain)) = 0 then
domainapi.DelDomainByName(domain)
domainapi.Save()
set domainapi = Nothing
end if
Response.Write("1000")
End Function

Function edituser(username,password,mailsize,endtime)
set userapi = Server.CreateObject("EasyMail.Users")
if password <> "" then
userapi.ChangeUserPassWord username,password
end if
if int(mailsize) > 0 then
userapi.SetMailBoxSize username, mailsize*1000
end if
if int(endtime) > 0 then
userapi.SetExpires username, endtime
end if
set userapi = Nothing
Response.Write("1000")
End Function
%>
您需要登录后才可以回帖 登录 | 会员注册

本版积分规则

小黑屋|手机版|Archiver|邮件技术资讯网

GMT+8, 2024-11-19 00:26

Powered by Discuz! X3.2

© 2001-2016 Comsenz Inc.

本论坛为非盈利中立机构,所有言论属发表者个人意见,不代表本论坛立场。内容所涉及版权和法律相关事宜请参考各自所有者的条款。
如认定侵犯了您权利,请联系我们。本论坛原创内容请联系后再行转载并务必保留我站信息。此声明修改不另行通知,保留最终解释权。
*本论坛会员专属QQ群:邮件技术资讯网会员QQ群
*本论坛会员备用QQ群:邮件技术资讯网备用群

快速回复 返回顶部 返回列表