<!--#include file="MailListConst.jsp" -->
<%
  mCharset = MailListInfo(8)
  'Jmail
Sub Send()
Select Case mailzj
  Case "Jmail"
    'Function UseJmail(Email,Topic,MailBody,Sender,SendContentType,Priority)
	On error resume next
	dim JMail
	Set JMail = Server.CreateObject("JMail.SMTPMail")
	JMail.Silent = True
	JMail.Logging = True
	JMail.Charset = "gb2312"
	JMail.ContentType = SendContentType 'text/plain text/html
	'TextPlain = "这是用超文本格式编写的邮件，请使用超文本方式浏览。"
	JMail.Sender = Sender
	JMail.Subject = Topic
	If ToMailcc <> "" Then JMail.AddRecipientCC ToMailcc
	If ToMailbcc <> "" Then JMail.AddRecipientBCC ToMailbcc 
	JMail.Body = MailBody
	JMail.AddRecipient Email
	if Priority="" then Priority = 3
	JMail.Priority = Priority
	'JMail.ServerAddress = MailListInfo(9)
	'JMail.MailServerUserName = MailListInfo(10) '您的邮件服务器登录名
	'JMail.MailServerPassword = MailListInfo(11) '登录密码
	JMail.Execute 
	Set JMail = nothing 
	If err then 
	  SendMail = err.description
	  err.clear
	Else
	  SendMail = "OK"
	End if
	UseJmail = SendMail'Return
    'End Function

  Case "Cdonts"
	on error resume next
	dim  objCDOMail
	Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
	objCDOMail.From =Forum_info(5)
	objCDOMail.To =email
	objCDOMail.Subject =topic
	objCDOMail.BodyFormat = 0 
	objCDOMail.MailFormat = 0 
	objCDOMail.Body =mailbody
	objCDOMail.Send
	Set objCDOMail = Nothing
	if err then 
	SendMail=err.description
	err.clear
	else
	SendMail="OK"
	end if
  Case "Cdonts"
	on error resume next
	dim mailer,recipient,sender,subject,message
	dim mailserver,result
	Set mailer=Server.CreateObject("ASPMAIL.jspMailCtrl.1")  
	recipient=email
	sender=Forum_info(5)
	subject=topic
	message=mailbody
	mailserver=Forum_info(4)
	result=mailer.SendMail(mailserver, recipient, sender, subject, message)
	if err then 
	SendMail=err.description
	err.clear
	else
	SendMail="OK"
	end if
  Case Else
	Response.Write "<script>alert('邮件组件设置错误！请返回重新设置!');this.location.href='management.jsp';</script>"
	Response.End
  End Select
End Sub

	Function EmailBody(body)
	Copyright="<FONT  face=Arial>Copyright &copy; 2006 运城生活网 [<a target='_blank' href='http://www.yclife.cn'>www.yclife.cn</a>] All Rights Reserved</FONT>"
	strBody=strBody &"<style>A:visited {	TEXT-DECORATION: none	}"
	strBody=strBody &"A:active  {	TEXT-DECORATION: none	}"
	strBody=strBody &"A:hover   {	TEXT-DECORATION: underline overline	}"
	strBody=strBody &"A:link 	  {	text-decoration: none;}"
	strBody=strBody &"A:visited {	text-decoration: none;}"
	strBody=strBody &"A:active  {	TEXT-DECORATION: none;}"
	strBody=strBody &"A:hover   {	TEXT-DECORATION: underline overline}"
	strBody=strBody &"BODY   {	FONT-FAMILY: 宋体; FONT-SIZE: 9pt;}"
	strBody=strBody &"TD	   {	FONT-FAMILY: 宋体; FONT-SIZE: 12pt	}</style>"
	strBody=strBody &"<TABLE bgcolor='#fcfcfc' border=0 width='95%' align=center><TBODY><TR>"
	strBody=strBody &"<TD valign=middle align=top>"
	strBody=strBody & body
	strBody=strBody &"</TD></TR></TBODY></TABLE><hr width=95% size=1><center>"
	strBody=strBody & Copyright & "</center>"
	EmailBody=strBody
	End Function
%>
