<!--#include file=cookies.asp-->
<%
dim smtphost,mail,pass,replyaddress,fs,fobj,nPath,filepath
filepath=server.mappath("../mail.asp")
if Instr(request("smtphost"),"=")>0 or Instr(request("smtphost"),"%")>0 or Instr(request("smtphost"),chr(32))>0 or Instr(request("smtphost"),"?")>0 or Instr(request("smtphost"),"&")>0 or Instr(request("smtphost"),";")>0 or Instr(request("smtphost"),",")>0 or Instr(request("smtphost"),"'")>0 or Instr(request("smtphost"),",")>0 or Instr(request("smtphost"),chr(34))>0 or Instr(request("smtphost"),chr(9))>0 or Instr(request("smtphost"),"")>0 or Instr(request("smtphost"),"$")>0 then
	response.write "<br>"+"<li>Smtp服务器地址存在非法字符。"
	response.end
end if
if Instr(request("mail"),"=")>0 or Instr(request("mail"),"%")>0 or Instr(request("mail"),chr(32))>0 or Instr(request("mail"),"?")>0 or Instr(request("mail"),"&")>0 or Instr(request("mail"),";")>0 or Instr(request("mail"),",")>0 or Instr(request("mail"),"'")>0 or Instr(request("mail"),",")>0 or Instr(request("mail"),chr(34))>0 or Instr(request("mail"),chr(9))>0 or Instr(request("mail"),"")>0 or Instr(request("mail"),"$")>0 then
	response.write "<br>"+"<li>有效邮箱地址存在非法字符。"
	response.end
end if
if Instr(request("pass"),"=")>0 or Instr(request("pass"),"%")>0 or Instr(request("pass"),chr(32))>0 or Instr(request("pass"),"?")>0 or Instr(request("pass"),"&")>0 or Instr(request("pass"),";")>0 or Instr(request("pass"),",")>0 or Instr(request("pass"),"'")>0 or Instr(request("pass"),",")>0 or Instr(request("pass"),chr(34))>0 or Instr(request("pass"),chr(9))>0 or Instr(request("pass"),"")>0 or Instr(request("pass"),"$")>0 then
	response.write "<br>"+"<li>访问密码存在非法字符。不能有“等符号！"
	response.end
end if
if Instr(request("replyaddress"),"=")>0 or Instr(request("replyaddress"),"%")>0 or Instr(request("replyaddress"),chr(32))>0 or Instr(request("replyaddress"),"?")>0 or Instr(request("replyaddress"),"&")>0 or Instr(request("replyaddress"),";")>0 or Instr(request("replyaddress"),",")>0 or Instr(request("replyaddress"),"'")>0 or Instr(request("replyaddress"),",")>0 or Instr(request("replyaddress"),chr(34))>0 or Instr(request("replyaddress"),chr(9))>0 or Instr(request("replyaddress"),"")>0 or Instr(request("replyaddress"),"$")>0 then
	response.write "<br>"+"<li>发信人邮箱存在非法字符。"
	response.end
end if
smtphost=request("smtphost")
mail=request("mail")
pass=request("pass")
replyaddress=request("replyaddress")
Set fobj = Server.CreateObject("SCRIPTING.FILESYSTEMOBJECT")
Set fs = fobj.CreateTextFile(filepath,true)
fs.Write("<"&chr(37)&chr(10))
fs.Write("dim mailname,mailpass,mailform,mailsmtp"&chr(10))
fs.Write("mailname="&chr(34)&mail&chr(34))
fs.Write(chr(13)&chr(10))
fs.Write("mailpass="&chr(34)&pass&chr(34))
fs.Write(chr(13)&chr(10))
fs.Write("mailform="&chr(34)&replyaddress&chr(34))
fs.Write(chr(13)&chr(10))
fs.Write("mailsmtp="&chr(34)&smtphost&chr(34)&chr(10))
fs.Write(chr(37)&">")
fs.close
%>
 <meta http-equiv="Content-Language" content="zh-cn">
<link href="inc_style.css" rel="stylesheet" type="text/css">
<p align="center">设置邮件服务器成功！</p>