<!-- #include file="../inc/inc.asp" -->
<%
  call head()


'英文检查
function ifhttp(str)
dim ht
ifhttp = 0
for ht=1 to len(str)
  if instr("(=)0123456789",mid(str,ht,1)) = 0 then
  ifhttp = ifhttp + 1
  end if
next
end function
Call saycarda("发送邮件")
%>

<img src="mail.png" alt="."/><br/>
发送邮件和互联网一样免费<br/>
<%dim sid,IP
sid=trim(request("sid"))
if trim(request("TP"))="" then%>
<%If saytk<>1 then%>
<form name="form" method="post" action="Email.asp?Action=save&amp;saytk=<%=saytk%>&amp;sid=<%=sid%>">
<%End if%>
你的用户名：<input name="name" maxlength="20"/><br/>
邮箱密码：<input name="pass" maxlength="50"/><br/>
你的邮箱：<input name="mail" maxlength="50" value="@"/><br/>
邮件主题：<input name="title" maxlength="50" value=""/><br/>
邮件内容：<input name="Content" value=""/><br/>
签名：<input name="FromName" maxlength="50" value=""/><br/>
对方邮箱：<input name="tomail" maxlength="50" value="@"/><br/>
发送服务器：(如:smtp.qq.com)<br/><input name="serveror" maxlength="50" value="smtp.qq.com"/><br/>
<%If saytk<>1 Then
response.write "<input type=""hidden"" name=""TP"" value=""1""/>"
response.write "<input type=""submit"" name=""Submit"" value=""确定提交""></form><br/>"

else%>
<anchor>提交提交
<go href="Email.asp?Action=save&amp;saytk=<%=saytk%>&amp;sid=<%=sid%>" method="post" accept-charset='utf-8'>
<postfield name="name" value="$(name)"/>
<postfield name="pass" value="$(pass)"/>
<postfield name="mail" value="$(mail)"/>
<postfield name="title" value="$(title)"/>
<postfield name="Content" value="$(Content)"/>
<postfield name="sid" value="<%=sid%>"/>
<postfield name="FromName" value="$(FromName)"/>
<postfield name="tomail" value="$(tomail)"/>
<postfield name="serveror" value="$(serveror)"/>
<postfield name="TP" value="1"/>
</go>
</anchor><br/>
<%End if
else
dim name,pass,mail,title,Content,FromName,tomail,url,serveror
name=trim(request("name"))
pass=trim(request("pass"))
'url=trim(request("url"))
mail=trim(request("mail"))
title=trim(request("title"))
Content=trim(request("Content"))
FromName=trim(request("FromName"))
tomail=trim(request("tomail"))
serveror=trim(request("serveror"))
IF name="" or pass="" or mail="" or title="" or Content="" or FromName="" OR tomail="" or serveror="" then
  Response.write "各项都不能为空!" & chr(13)
response.write "<br/><a href=""Email.asp?sid="&sid&""">返回上级</a>"
response.write "<br/><a href=""/index.asp?sid="&sid&""">网站首页</a><br/>"
response.write"<img src='/foryou/clock.gif' alt='.'/>"&Month(Now)&"月"&Day(Now)&"日"&FormatDateTime(Now,vbshortTime)&""
Call headsay()

  Response.end
end if
'IF url<>"" and url<>"http://" then
'if Instr(url,"twapp.cn")<=0 and Instr(url,"nowtx.cn")<=0 then
  'Response.write "附件资源地址只能是本站的!" & chr(13)
  'Response.write "<br/><a href=""/index.asp?sid="&sid&""">返回首页</a>" & chr(13)
  'Response.write "</p></card></wml>"
  'Response.end
'end if
'end if
Dim msg
Set msg = Server.CreateObject("JMail.Message")
msg.ContentType = "multipart/mixed"
msg.CharSet = "GB2312"
msg.FromName = FromName				'发件者的签名
msg.From = mail			'发件者邮箱
msg.ReplyTo = mail			'指定回复邮箱
msg.Subject = title					'邮件主题
msg.Body =Content & vbCrLf
msg.Body =msg.Body & "" & vbCrLf
msg.Body =msg.Body & ""	'邮件正文
'if url<>"" and url<>"http://" then
msg.AddAttachment(Server.MapPath(""&bbslogo&""))	'附件地址，必填
'end if
msg.AddRecipient tomail, ""		'收件人的邮箱、签名
msg.MailServerUserName = name		'自己邮箱的管理用户名
msg.MailServerPassword  = pass	'自己邮箱密码
msg.Send(serveror)				'发邮件服务器
msg.Close
Set msg = Nothing
response.Write "您的邮件已成功发送！<br/>"
response.Write "<a href='Email.asp?sid="&sid&"'>再写一篇</a><br/>"
end if
response.Write "<a href='mailhelp.asp?sid="&sid&"'>服务器设置</a><br/>"
response.write "<br/><a href=""index.asp?sid="&sid&""">返回上级</a>"
response.write "<br/><a href=""/index.asp?sid="&sid&""">网站首页</a><br/>"
response.write"<img src='/foryou/clock.gif' alt='.'/>"&Month(Now)&"月"&Day(Now)&"日"&FormatDateTime(Now,vbshortTime)&""
Call headsay()
%>