<!-- #Include File="Cls_Email.asp" -->
<%
'=======================================================
' 欢迎使用《阿赛大型门户网站系统V3.0》，简称“AsaiMHV3”
' 技术支持、商业版咨询、官方唯一指定联系QQ“4941172”
' 官方网站：http://77ya.com      程序负责人：阿赛
'=======================================================

dim Tmp1,web_sm_type,web_sm_server,web_sm_user,web_sm_pass
Tmp1 = Split(Cls.Web_MailServer,",")
web_sm_type=Tmp1(0)
web_sm_server=Tmp1(1)
web_sm_user=Tmp1(2)
web_sm_pass=Tmp1(3)

function send_mail(s_username,s_email,s_topic,s_body)
	dim temp1
	temp1=s_username&"，你好！" & _
	vbcrlf& _
	vbcrlf& s_body & _
	vbcrlf& _
	vbcrlf&"--------------------------------------------------------" & _
	vbcrlf&"更多精彩信息请访问：" & _
	vbcrlf& _
	vbcrlf& Web_Dim(1) & _
	vbcrlf& Web_Dim(2) & _
	vbcrlf& _
	vbcrlf&"欢迎您的光临！" & _
	vbcrlf&"--------------------------------------------------------" & _
	vbcrlf&"注：本邮件为系统邮件！" & _
	vbcrlf&"邮件发送时间："&Cls.time_type(Cls.now_time,2)
	send_mail=SendTheMail(s_email,"系统邮件："&s_topic&"（"&Web_Dim(1)&"）",temp1,"系统邮件管理员",web_sm_user)
End Function

function SendTheMail(j_sendname,j_Subject,j_HTMLBody,j_name,j_email)
	dim sendmail
	set sendmail = new Cls_SendMail
	sendmail.ServerLoginName = web_sm_user		'设置您的邮件服务器登录名
	sendmail.ServerLoginPass = web_sm_pass		'设置登录密码
	sendmail.SendSMTP        = web_sm_server	'设置SMTP邮件服务器地址
	sendmail.SendFromEmail   = j_email		'设置发件人的E-MAIL地址
	sendmail.SendFromName    = j_name		'设置发送人名称
	sendmail.ContentType     = "text/plain"		'设置邮件类型 默认：text/html
	sendmail.CharsetType     = "gb2312"	        '设置编码类型 默认：gb2312
	sendmail.SendObject	 = Int(web_sm_type)	'设置选取组件 1=Jmail,2=Cdonts,3=Aspemail
	'发送信件 => 收信人地址,信件主题,信件内容
	sendmail.SendMail j_sendname,j_Subject,j_HTMLBody
	'检查是否发送成功
	if sendmail.ErrCode = 0 then	
		SendTheMail=true
	else
		SendTheMail=false
	end If
	'错误描述
	'Response.write sendmail.Description
	set sendmail = nothing  
End Function
%>
