<!--#include file="../inc/safe.asp"-->
<%
  Response.Buffer = true
  Response.ExpiresAbsolute=now()-1
  Response.Expires=0
  Response.CacheControl="no-cache"
%>
<%
if Not ChkPost then 
response.redirect ("../login/chklogin.asp?login=4")
response.end
end if
%>
<%
myname=Replace_Text(request("myname"))
myemail=Replace_Text(request("myemail"))
content=Replace_Text(request("content"))

topic="我是"&myname&",有事找你！" ' 信件主题
mailbody=content ' 信件内容

ToEmail1=Replace_Text(request("ToEmail1"))
ToEmail2=Replace_Text(request("ToEmail2"))
ToEmail3=Replace_Text(request("ToEmail3"))
ToEmail4=Replace_Text(request("ToEmail4"))
ToEmail5=Replace_Text(request("ToEmail5"))
ToEmail6=Replace_Text(request("ToEmail6"))
ToEmail7=Replace_Text(request("ToEmail7"))
ToEmail8=Replace_Text(request("ToEmail8"))

if IsValidEmail(ToEmail1)=true then sendjmail2 ToEmail1,topic,mailbody
if IsValidEmail(ToEmail2)=true then sendjmail2 ToEmail2,topic,mailbody
if IsValidEmail(ToEmail3)=true then sendjmail2 ToEmail3,topic,mailbody
if IsValidEmail(ToEmail4)=true then sendjmail2 ToEmail4,topic,mailbody
if IsValidEmail(ToEmail5)=true then sendjmail2 ToEmail5,topic,mailbody
if IsValidEmail(ToEmail6)=true then sendjmail2 ToEmail6,topic,mailbody
if IsValidEmail(ToEmail7)=true then sendjmail2 ToEmail7,topic,mailbody
if IsValidEmail(ToEmail8)=true then sendjmail2 ToEmail8,topic,mailbody

'If SendJmail(email,Topic,MailBody) = 1 Then
'	Response.Write "<br/><br/>资料成功发送到您的注册邮箱！"
'Else
'	Response.Write "<br/><br/>未正确设置邮件发送或您填写的邮件地址有误，资料发送失败！"
'End If

Function SendJmail2(Email,Topic,MailBody)

	Dim JMail
	on error resume next
	Set JMail = Server.CreateObject("JMail.SMTPMail")
	JMail.LazySend            = true
	JMail.silent            = true
	JMail.Charset            = "gb2312"
	JMail.ContentType      = "text/html"
	JMail.Sender            = ""&myname&"" '发送人
	JMail.ReplyTo            = ""&myemail&"" '回复到
	JMail.SenderName      = "推荐产品信息"
	JMail.Subject            = Topic
	JMail.SimpleLayout      = true
	JMail.Body            = MailBody
	JMail.Priority            = 3  '邮件的紧急程序，1 为最快，5 为最慢， 3 为默认值
	JMail.AddRecipient Email
	JMail.AddHeader "Originating-IP", GBL_IPAddress
	If JMail.Execute() = false Then
		SendJmail = 0
	Else
		SendJmail = 1
	End If
	JMail.Close
	Set JMail = Nothing

End Function
%>
<!--#include file="head.asp"-->

<br><br><br>
<TABLE cellSpacing=0 cellPadding=0 width=550 border=0 align="center">
  <TBODY> 
  <TR>
          <TD>
            <TABLE cellSpacing=0 cellPadding=0 width=450 border=0>
              
              <TR>
                <TD width=20 bgColor=#CC3300><IMG 
                  src="../images/arrowhead.gif"></TD>
                <TD width=160 bgColor=#CC3300><B><FONT 
                  color=#ffffcc><NOBR>发送成功！ </NOBR></FONT></B></TD>
                <TD width=20><IMG 
                src="../images/round.gif"></TD></table></TD></TR></TABLE>	
<TABLE width=550 border=0 align="center" cellPadding=1 cellSpacing=0 bgColor=#000000>
  <tr valign=top>
	<td>
		<table bgColor="#ffffec" border=0 cellPadding=5 cellSpacing=0 width=100%>
		<tr valign=top>
		<td><br><font size=4 color="ff8019"><b>
您的信息已经被成功的发送。感谢您的支持！
		</b></font><br><br><br><br></td>
		</tr>
		<tr valign=top>
		<td align=right><font class=f2><b>
		<a href="../index.asp">返回首页</a>
		</b></font><br></td></tr>
		</table>
	</td>
	</tr>
	</table>
<br><br><br><br>
<!--#include file="../inc/end.asp"-->