<% 
mainpath="data/iheeo_db.mdb"
Set conn = Server.CreateObject("ADODB.Connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(mainpath)
conn.Open connstr

set rs1=server.CreateObject("adodb.recordset")
sql="select top 1 * from ka where bookid=371 and fasong=1 order by id"  
rs1.open sql,conn,1,3

If Not(rs1.bof Or rs1.eof) Then 
   rs1("fasong")="2"
   kahao= rs1("kahao")
   mima= rs1("mima")
   rs1.update

    mailbody = mailbody &"您订购的卡号信息：<br><br>"
	mailbody = mailbody &"卡号："&kahao&"<br><br>"
	mailbody = mailbody &"密码："&mima&"<br><br>"
	mailbody = mailbody &"请您注意保管。"

	set jmail = server.CreateObject ("jmail.message")  '创建对象
    jmail.Silent = true                         '一般不用改
    jmail.Charset = "gb2312"                    '信件的语言编码
    jmail.ContentType = "text/html"             '信件的格式html或纯文本
    jmail.From = "380799055@qq.com"                '发信人邮箱
    jmail.FromName = "E讯商城"         '发信人姓名
    jmail.Subject = "您订购的卡的信息"  '信件主题
    jmail.AddRecipient "jessewan@163.com"           '收信人地址
    jmail.HTMLBody = mailbody'信件正文
    jmail.MailServerUserName = "380799055@qq.com"  '服务器登陆用户名(您的邮件地址)
    jmail.MailServerPassWord = "ilovejojo"         '服务器登陆密码(您的邮件密码)
    jmail.Send("smtp.qq.com")                 '服务器地址
    jmail.Close	
	response.Write "ok"
end if
%> 

