<!--#include file="../head.asp"-->
  <!--#include file="../checkrole.asp"-->
 <%
      call checkuser("sh") 
	    Response.Buffer = true
  Response.ExpiresAbsolute=now()-1
  Response.Expires=0
  Response.CacheControl="no-cache"
if issession=0 then
gsid=Replace_Text(request.Cookies("Yxmemberid"))
else
gsid=session("id")
end if
if Not ChkPost then 
		response.write "<script language='javascript'>"
		response.write"parent.location.href='"&HOPE_InstallDir&"login/login1.asp';</SCRIPT>"
		response.end
end if
 
 
set rs=conn.execute("select email from Yixiang_corporation where id="&gsid&"")
myemail=rs("email")
rs.close
set rs=nothing
conn.close
set conn=nothing

myname=Replace_Text(request("myname"))
email=Replace_Text(request("email"))
  Dim l_message
' 声明变量

	l_message = "<!DOCTYPE HTML PUBLIC ""-//IETF//DTD HTML//EN"">" & vbCrLf 
	l_message = l_message & "<html>" 
	l_message = l_message & "<head>" 
	l_message = l_message & "<meta http-equiv=""Content-Type""" 
	l_message = l_message & "content=""text/html; charset=gb2312"">" 
	l_message = l_message & "<title>您好，我的朋友</title>" 
	l_message = l_message & "<style>"
    l_message = l_message & ".L {"
	l_message = l_message & "FONT-WEIGHT: bold; FONT-SIZE: 16px; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal"
	l_message = l_message & "}"
	l_message = l_message & ".lh15 {"
	l_message = l_message & "LINE-HEIGHT: 150%"
	l_message = l_message & "}"
	l_message = l_message & "</style>"
	l_message = l_message & "</head>" 
	l_message = l_message & "<body text=#000000 leftMargin=0 topMargin=0 marginheight=0 marginwidth=0>" 
   	l_message = l_message & "您好！ 我是"&myname&"！近来可好啊？一段时间没有联系，不会把我忘了吧？呵呵！"
	l_message = l_message & "最近我在"&webname&"搞了叫“商业伙伴”的服务，可以用来管理自己的生意伙伴关系，做生意非常用得上哦！我经常里面找自己想认识的生意人，不管什么行业或地方的，只要查找一下就都有了，找到以后，"
	l_message = l_message & "就好把他们加入自己的商业伙伴列表啦！然后还能通过用电子邮件或网上留言"
	l_message = l_message & "跟对方直接联系呢！搞不好就情场、商场两得意了，嘿嘿！用起来真的很爽！听说现在有许多商人都在用它哪！"
	l_message = l_message & "对啦，我已把你加入到我的商业伙伴列表了，你也赶快去搞一个吧，这样我们就可以随时随地在网上侃大山、谈生意、交友约会了！"
	l_message = l_message & "哈哈！打开这个链接 <a href='"&weburl&"member/myfriend/index.asp' target='_blank'>"&weburl&"member/myfriend/index.asp</a> ,只要简单几步就可以成功加入"&webname&"，"
	l_message = l_message & "使用他们提供的“商业伙伴”的服务啦！<BR><BR>"
	l_message = l_message & "我们网上见！<BR><BR>"
	l_message = l_message & "老朋友: "&myname&"<BR>"
	l_message = l_message & ""&FormatDate(date(),1)&""
   	l_message = l_message & "</body>"
	l_message = l_message & "</html>" 	
   	

topic="我是"&myname&",我搞了个伙伴关系管理工具，你也来加入吧！" ' 信件主题
mailbody=l_message ' 信件内容

if instr(email,",")>0 then
Arremail=split(email,",")
for i=0 to ubound(Arremail)
if IsValidEmail(Arremail(i))=true then sendjmail2 Arremail(i),topic,mailbody 'email为所填邮箱
next
else
if IsValidEmail(email)=true then sendjmail2 email,topic,mailbody 'email为所填邮箱
end if
'If SendJmail(email,Topic,MailBody) = 1 Then
'	Response.Write "<br/><br/>资料成功发送到您的注册邮箱！"
'Else
'	Response.Write "<br/><br/>未正确设置邮件发送或您填写的邮件地址有误，资料发送失败！"
'End If

'Jmail邮件发送
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
	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
%>

<TABLE width=778 border=0 align="center" cellPadding=0 cellSpacing=0>
  <TBODY>
  <TR>
    <TD  style="BACKGROUND-POSITION: right 50%; BACKGROUND-IMAGE: url(i../mages/bg1.gif); BACKGROUND-REPEAT: repeat-y; BACKGROUND-COLOR: #ffffff" 
    vAlign=top align=middle>
      <TABLE cellSpacing=0 cellPadding=0 width=100% border=0>
        <TBODY>
        <TR>
              <TD width="6%"><IMG height=32 src="../images/myfriend.gif" 
            border=0></TD>
              <TD width="94%" background="../images/info_bg.gif">&nbsp;</TD>
        </TR></TBODY></TABLE>

<TABLE class=content_border cellSpacing=0 cellPadding=0 width=100% 
border=0>
        <TBODY>
        <TR>
          <TD align=middle>            <BR>
            <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
              <TBODY>
              <TR>
              <TD class=M>恭喜您！邀请商业伙伴邀请信发送成功！ </TD></TR></TBODY></TABLE><BR>
            <TABLE class=bdr3 cellSpacing=0 cellPadding=0 width="100%" 
              border=0>
              <TBODY>
              <TR>
                <TD class=tbg1>现在您可以：</TD></TR>
              <TR>
                <TD class=lh15>
                  <UL>
                    <TABLE cellSpacing=0 cellPadding=9 width="95%" border=0>
                      <TBODY>
                      <TR>
                        <TD class=C>
              <LI><SPAN class=C><A 
                          href="index.asp">回到“我的商业伙伴”</A></SPAN></LI></TD></TR></TBODY></TABLE></UL></TD></TR></TBODY></TABLE>
            <BR>
                <A 
            href="../../index.asp" target="_blank"><B>返回首页</B></A> <BR>
      <BR></TD></TR></TBODY></TABLE>
</TABLE>