<%
sub EmailUserRegister()'新用户注册发邮件
If Request.Form ("password")<>"" Then password=Request.Form ("password")
Subject="新用户注册确认信.."
body =replace(Application("emailreg"),"#真名#",Request.Form("truename"))
body =replace(body,"#用户名#",LCASE(trim(Request.Form ("username"))))
body =replace(body,"#密码#",trim(password))
end sub

sub EmailUserActive()'新用户注册发邮件
SERVER_NAME=Request.ServerVariables("SERVER_NAME")
If Request.ServerVariables("HTTP_FreeHostAPISITE")<>"" Then SERVER_NAME=Request.ServerVariables("HTTP_FreeHostAPISITE")
Subject="新用户激活信.."
body =replace(Application("emailregact"),"#真名#",Request.Form("truename"))
body =replace(body,"#用户名#",LCASE(trim(Request.Form ("username"))))
body =replace(body,"#密码#",trim(Request.Form ("password")))
body =replace(body,"#激活网址#","http://"&SERVER_NAME&"/user/activeuser.asp?username="&dsreg("username")&"&key="&md5("freehost"&dsreg("password")))
end sub

sub EmailUserFindPass()'用户忘记密码
SERVER_NAME=Request.ServerVariables("SERVER_NAME")
If Request.ServerVariables("HTTP_FreeHostAPISITE")<>"" Then SERVER_NAME=Request.ServerVariables("HTTP_FreeHostAPISITE")
Subject="查找密码.."
body =replace(Application("emailuserforget"),"#真名#",Request.Form("truename"))
body =replace(body,"#用户名#",LCASE(trim(Request.Form ("username"))))
If Request.ServerVariables("server_port")="443" Then
body =replace(body,"#重设密码网址#","https://"&SERVER_NAME&"/user/resetpass.asp?username="&dsreg("username")&"&key="&md5(dsreg("password")))
Else
body =replace(body,"#重设密码网址#","http://"&SERVER_NAME&"/user/resetpass.asp?username="&dsreg("username")&"&key="&md5(dsreg("password")))
End if
end sub

sub EmailAgentRegister()'新代理注册发邮件
Subject="新代理注册资料接收确认信.."
body =replace(Application("emailregagn"),"#真名#",Request.Form("truename"))
body =replace(body,"#用户名#",LCASE(trim(Request.Form ("username"))))
body =replace(body,"#密码#",trim(Request.Form ("password")))
end sub

sub EmailAgentRegisterACT()'新代理注册发邮件
Subject="代理正式开通邮件"
body =Application("emailregactagn")
body =replace(body,"#真名#",ds("truename"))
body =replace(body,"#用户名#",ds("username"))
body =replace(body,"#密码#",trim(Request.Form ("password")))
body =replace(body,"#代理级别#",Request.Form ("agenttype"))
body =replace(body,"#金额#",ds("usermoney"))
end sub

sub EmailAgentFindPass()'代理忘记密码
SERVER_NAME=Request.ServerVariables("SERVER_NAME")
If Request.ServerVariables("HTTP_FreeHostAPISITE")<>"" Then SERVER_NAME=Request.ServerVariables("HTTP_FreeHostAPISITE")
Subject="查找密码.."
body =replace(Application("emailuserforgetagn"),"#真名#",Request.Form("truename"))
body =replace(body,"#用户名#",LCASE(trim(Request.Form ("username"))))
body =replace(body,"#重设密码网址#","http://"&SERVER_NAME&"/agent/resetpass.asp?username="&ds("username")&"&key="&md5(ds("password")))
end sub

sub emaildomainopen()'名注册发信
Subject="域名开通确认信.."
body =Application("emaildomainopen")
body =replace(body,"#用户名#",ds("username"))
body =replace(body,"#域名#",dsdom("Domain"))
body =replace(body,"#到期时间#",temptime)
body =replace(body,"#金额#",newuser_money)
end sub

sub emaildomainend()'名到期发信
Subject="域名到期通知.."
body =Application("emaildomainend")
body =replace(body,"#用户名#",ds("username"))
body =replace(body,"#域名#",dsph("Domain"))
body =replace(body,"#到期时间#",dsph("endtime"))
end sub


sub emailhostend()'主机期发信
Subject="虚拟主机到期通知.."
body =Application("emailhostend")
body =replace(body,"#用户名#",ds("username"))
body =replace(body,"#FTP#",dsph("ftpname"))
body =replace(body,"#到期时间#",dsph("endtime"))
end sub

sub emailend()'邮箱到期发信
Subject="邮箱到期通知.."
body =Application("emailend")
body =replace(body,"#用户名#",ds("username"))
body =replace(body,"#产品类型#",dsph("emailtype"))
body =replace(body,"#到期时间#",dsph("endtime"))
end sub

sub emailsqlend()'数据库到期发信
Subject="数据库到期通知.."
body =Application("emailsqlend")
body =replace(body,"#用户名#",ds("username"))
body =replace(body,"#数据库名#",dsph("sqlname"))
body =replace(body,"#到期时间#",dsph("endtime"))
end sub

sub emailotherend()'其他类到期发信
Subject="产品到期通知.."
body =Application("emailotherend")
body =replace(body,"#用户名#",ds("username"))
body =replace(body,"#产品类型#",dsph("othertype"))
body =replace(body,"#到期时间#",dsph("endtime"))
end sub

sub EmailUserHOSTOpen()'虚拟主机开通
Subject="虚拟主机开通确认信.."
body =Application("emailhostopen")
body =replace(body,"#用户名#",ds("username"))
If UBound(hostcomment_arry)>0 Or UBound(hostcomment_arry)=0 Then
If Not IsNull(hostcomment_arry(0)) Then
body =replace(body,"#默认域名#","http://"&Replace(hostcomment_arry(0),":80:",""))
End If
End if
body =replace(body,"#FTP地址#",dsserver("ftpdomain"))
body =replace(body,"#IP#",dsserver("ip"))
body =replace(body,"#FTP#",ftpname)
body =replace(body,"#FTP密码#",password)
'body =replace(body,"#产品类型#",dsph("Hosttype"))
body =replace(body,"#到期时间#",temptime)
body =replace(body,"#金额#",newuser_money)
end sub

sub EmailUserSQLOpen()'数据库开通
Subject="数据库开通确认信.."
body =Application("emailsqlopen")
if softtype="SQL2000" then'是SQL 2000
sqlemailbody ="恭喜！ 您的SQL SERVER数据库已开通了！ "&vbcrlf&_
"数据库用户名:"&sqlname&vbcrlf&_
"数据库密码:"&sqlpassword&vbcrlf&_
"数据库名称:"&sqlname&vbcrlf&_
"数据库所在IP:"&ip&vbcrlf&_
"所用的连接端口:"&port&vbcrlf&_
"到期时间是:"&temptime&vbcrlf&_
"您的帐户余款是:"&newuser_money&"元"&vbcrlf
body =replace(body,"#数据库开通信息#",sqlemailbody)
else'是Mysql
sqlemailbody ="恭喜！ 您的MySQL数据库已开通了！ "&vbcrlf&vbcrlf&_
"数据库用户名:"&sqlname&vbcrlf&_
"数据库密码:"&sqlpassword&vbcrlf&_
"数据库名称:"&sqlname&vbcrlf&_
"数据库所在IP:"&ip&vbcrlf&_
"所用的连接端口:"&port&vbcrlf&_
"到期时间是:"&temptime&vbcrlf&_
"您的帐户余款是:"&newuser_money&"元"&vbcrlf
body =replace(body,"#数据库开通信息#",sqlemailbody)
end if
end sub

sub emailopen()'邮箱开通
Subject="邮箱开通确认信.."
body =Application("emailopen")
body =replace(body,"#用户名#",ds("username"))
body =replace(body,"#产品类型#",dsphemail("Emailtype"))
body =replace(body,"#到期时间#",temptime)
body =replace(body,"#金额#",newuser_money)
end sub

sub emailotheropen()'other开通
Subject="产品开通确认信.."
body =Application("emailotheropen")
body =replace(body,"#用户名#",ds("username"))
body =replace(body,"#产品类型#",dsphOther("Othertype"))
body =replace(body,"#到期时间#",temptime)
body =replace(body,"#金额#",newuser_money)
end Sub

sub emailcdnopen()'CDN开通
Subject="CDN产品开通确认信.."
body =Application("emailcdnopen")
body =replace(body,"#用户名#",ds("username"))
body =replace(body,"#产品类型#",dsph("CDNtype"))
body =replace(body,"#到期时间#",temptime)
body =replace(body,"#金额#",newuser_money)
end Sub

sub emailvpsopen()'vps开通
Subject="云服务器产品开通确认信.."
body =Application("emailvpsopen")
body =replace(body,"#用户名#",ds("username"))
body =replace(body,"#云服务器名#",dsph("vpsname"))
body =replace(body,"#产品类型#",dsph("vpstype"))
body =replace(body,"#到期时间#",temptime)
body =replace(body,"#金额#",newuser_money)
end Sub

sub emailidcopen()'idc开通
Subject="IDC产品开通确认信.."
body =Application("emailidcopen")
body =replace(body,"#用户名#",ds("username"))
body =replace(body,"#产品类型#",dsphIDC("IDCtype"))
body =replace(body,"#到期时间#",temptime)
body =replace(body,"#金额#",newuser_money)
end Sub

sub emailVPSend()'VPS到期发信
Subject="云服务器产品到期通知.."
body =Application("emailvpsend")
body =replace(body,"#用户名#",ds("username"))
body =replace(body,"#云服务器名#",dsph("vpsname"))
body =replace(body,"#IP#",vpsip)
body =replace(body,"#到期时间#",dsph("endtime"))
end Sub

sub emailIDCend()'idc到期发信
Subject="idc产品到期通知.."
body =Application("emailidcend")
body =replace(body,"#用户名#",ds("username"))
body =replace(body,"#IP#",idcip)
body =replace(body,"#到期时间#",dsph("endtime"))
end sub

sub emailCDNend()'VPS到期发信
Subject="CDN产品到期通知.."
body =Application("emailcdnend")
body =replace(body,"#用户名#",ds("username"))
body =replace(body,"#CDN名#",dsph("ftpname"))
body =replace(body,"#到期时间#",dsph("endtime"))
end Sub

%>