<%
Dim MailAddress  '服务器地址
Dim MailUserName '邮件用户名
Dim MailUserPass '邮件密码
Dim MailName     '发送人
Dim MailSend     '发送邮箱
Dim MailTitle    '邮件标题
Dim MailNameStr  '邮件名称
Dim MailContent  '邮件主体内容
Dim URLAttachment'发送网页连接
Dim Attachment   '附件
Dim ToMailbcc    '密送
Dim ToMailcc     '抄送
Dim MailFormat   '内容格式
Dim JMail
Dim Mail         '接收邮件
Dim MailBody     '主体
	'发送注册邮件
Sub F_mail()
    on error resume next
	mailbody=mailbody & "<HTML>"
	mailbody=mailbody & "<HEAD>"
	mailbody=mailbody & "<TITLE>"& MailNameStr &"</TITLE>"
	mailbody=mailbody & "<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=gb2312"">"
	mailbody=mailbody & "<link href=""http://www.elight.cn/Search/images/search.css"" rel=""stylesheet"" type=""text/css"">"
	mailbody=mailbody & "</HEAD>"
	mailbody=mailbody & "<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>"
	mailbody=mailbody & "<TABLE WIDTH=623 BORDER=0 align=""center"" CELLPADDING=0 CELLSPACING=0>"
	mailbody=mailbody & "<TR>"
	mailbody=mailbody & "<TD><img src=""http://www.elight.cn/Search/images/Mail_info/top.gif""></TD></TR>"
	mailbody=mailbody & "<TR>"
	mailbody=mailbody & "<TD height=""30"" background=""http://www.elight.cn/Search/images/Mail_info/bg.gif""> <table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"
	mailbody=mailbody & "<tr>"
	mailbody=mailbody & "<td height=""35""><table width=""100%"" border=""0"" align=""center"" cellpadding=""8"" cellspacing=""0"">"
	mailbody=mailbody & "<tr>"
	mailbody=mailbody & " <td><strong><font color=ff6600>"& MailTitle &"</font></strong></td>"
	mailbody=mailbody & "</tr>"
	mailbody=mailbody & "</table></td>"
	mailbody=mailbody & "</tr>"
	mailbody=mailbody & "<tr> "
	mailbody=mailbody & "<td><img src=""http://www.elight.cn/Search/images/Mail_info/1.gif"" width=""623"" height=""3""></td>"
	mailbody=mailbody & "</tr>"
	mailbody=mailbody & "<tr> "
	mailbody=mailbody & "<td>"
	mailbody=mailbody & "<table width=""100%"" border=""0"" align=""center"" cellpadding=""8"" cellspacing=""0"">"
	mailbody=mailbody & "<tr>"
	mailbody=mailbody & "<td>"
	mailbody=mailbody & ""& MailContent &""
	mailbody=mailbody & "</td>"
	mailbody=mailbody & "</tr>"
	mailbody=mailbody & "</table>"
	mailbody=mailbody & "</td>"
	mailbody=mailbody & "</tr>"
	mailbody=mailbody & "<tr>"
	mailbody=mailbody & "<td height=""1""><img src=""http://www.elight.cn/Search/images/Mail_info/foot1.gif"" width=""623"" height=""1""></td>"
	mailbody=mailbody & "</tr>"
	mailbody=mailbody & "<tr> "
	mailbody=mailbody & "<td height=""20"" align=""center"">Copyright&copy;2004-2005, "
	mailbody=mailbody & "<a href=""http://www.elight.cn"" target=""_blank""><span class=""none1"">elight.cn</span></a> "
	mailbody=mailbody & "inc All Rights Resrved</td>"
	mailbody=mailbody & "</tr>"
	mailbody=mailbody & "</table>"
	mailbody=mailbody & "</TD>"
	mailbody=mailbody & "</TR>"
	mailbody=mailbody & "<TR> "
	mailbody=mailbody & "</TR>"
	mailbody=mailbody & "<TR> "
	mailbody=mailbody & "<TD><img src=""http://www.elight.cn/Search/images/Mail_info/foot.gif"" width=""623"" height=""11""></TD> "
	mailbody=mailbody & "</TR> "
	mailbody=mailbody & "</TABLE>"
	mailbody=mailbody & "</BODY> "
	mailbody=mailbody & "</HTML>"
'=========================================================

        URLAttachment      = ""
        Attachment         = ""
		ToMailbcc          = ""
		ToMailcc           = ""
		MailFormat         = "html"
		Set JMail          = Server.CreateObject("JMail.Message")
		JMail.Silent       = TRUE
		JMail.CharSet      = "gb2312"
		JMail.ReplyTo      = "elightchina@hotmail.com"'回信地址
		JMail.From         = mailsend
		Jmail.FromName     = mailname
		JMail.Subject      = MailNameStr
		JMail.AddRecipient Mail
		If ToMailcc <> "" and Not IsNull(ToMailcc) Then JMail.AddRecipientCC ToMailcc '抄送
		If ToMailbcc <> "" and Not IsNull(ToMailbcc) Then JMail.AddRecipientBCC ToMailbcc '密送
		If MailFormat = "html" Then
			JMail.HTMLBody = MailBody
		Else
			JMail.Body     = MailBody
		End If
		JMail.Priority     = 3
		If Attachment <> "" and Not IsNull(Attachment) Then JMail.AddAttachment(Attachment)
		If URLAttachment <> "" and Not IsNull(URLAttachment) Then JMail.AddURLAttachment URLAttachment
		'If TimeMail Then JMail.DeferredDelivery = sendtime
		If mailusername <> "" Then JMail.MailServerUserName = mailusername
		If mailuserpass <> "" Then JMail.MailServerPassword = mailuserpass
		err=JMail.SEnd(mailaddress)
        jmail.close
        set jmail=nothing 
End Sub
%>