<!--#include file="Common/Inc_DatConn.asp"-->
<!--#include file="Common/Inc_Function.asp"-->
<!--#include file="Common/fy_ClsEmail.asp"-->

<%
HomePage="http://"&request.servervariables("server_name")&replace(lcase(request.servervariables("url")),"xinxi_mailchk.asp","")
Select Case Cint(mailser)
Case 1
ObjInstalled=IsObjInstalled("JMail.Message")
Case 2
ObjInstalled=IsObjInstalled("CDONTS.NewMail")
Case 3
ObjInstalled=IsObjInstalled("Persits.MailSender")
Case Else
ObjInstalled=False
End Select
if ObjInstalled=False then
Response.write("您的服务器不支持Jmail邮件发送组件，不能使用此功能！")
Response.end
end if

dim rs,sql,id,email,s1,mailbiaoti,emailto
email=trim(request("maildizhi"))
id=trim(request("id"))
emailto=trim(request("emailto"))
	if Not fyChkEmail(emailto) then
response.write "收件人有误"
response.end
	end if
mailbiaoti=trim(request("mailbiaoti"))
s1=trim(request("s1"))
If ObjInstalled=False Then
response.write "您的服务器不支持Jmail邮件发送组件，不能使用此功能！"
response.end
else
if email="" or mailbiaoti="" or s1="" then
response.write "<li>没有填写完整！"
response.end
end if
call mail()
end  if
%>
<%
sub mail()
mailbody="<TABLE cellSpacing=2 cellPadding=0 width=100% border=0 NOWRAP=0>"
mailbody=mailbody&"<TBODY>发布内容"


	Dim FYEmail
	Set FYEmail = New Cls_SendMail
	FYEmail.SendObject = Cint(mailser)	'设置选取组件
	FYEmail.ServerLoginName = mailname	'您的邮件服务器登录名
	FYEmail.ServerLoginPass = mailpass	'登录密码
	FYEmail.SendSMTP = mailsmtp			'SMTP地址
	FYEmail.SendFromEmail = mailform		'发送来源地址
	FYEmail.SendFromName = title		'发送人信息
	If FYEmail.ErrCode = 0 Then
		FYEmail.SendMail emailto,mailbiaoti,mailbody	'执行发送邮件
	End If
	If FYEmail.ErrCode <> 0 Then
		Response.write FYEmail.Description
	else
		Response.write "恭喜您，已经成功发送邮件！"
	end if

end sub
%>