<%if cstr(session("getcode"))<>cstr(trim(request("captcha"))) thenresponse.Write ""response.endend ifset rs=server.CreateObject("adodb.recordset")sql="select * from [order]"rs.open sql,conn,1,3rs.addnewrs("username")=request("username")rs("location_p")=request("location_p")rs("location_c")=request("location_c")rs("location_a")=request("location_a")rs("phone")=request("phone")rs("email")=request("email")rs("qq")=request("qq")rs.updaters.closeset rs=nothingset rss=server.CreateObject("adodb.recordset")sql="select * from [email]"rss.open sql,conn,1,1uemail=rss("email")upass=rss("pass")rss.closeset rss=nothingOn error resume nextDim JMail, contentIdSet JMail = Server.CreateObject("JMail.Message") JMail.Charset = "gb2312" JMail.ISOEncodeHeaders = False ' 是否进行ISO编码,默认为TrueJMail.From =uemail ' 发送者地址JMail.FromName = "盐城微信公众平台" ' 发送者姓名JMail.Subject = "注册试用" ' 邮件主题JMail.MailServerUserName =uemail ' 身份验证的用户名JMail.MailServerPassword =upass ' 身份验证的密码' 设置优先级,范围从1到5,越大的优先级越高,3为普通JMail.Priority = 3JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")' 加入一个收件人【变量email:收件人地址】可以同一语句重复加入多个JMail.AddRecipient("51291154@qq.com")JMail.AddRecipient("63023175@qq.com")' 加入附件【变量filename:附件文件的绝对地址,确保用户IUSR_机器名有访问的权限】' 【参数设置是(True)否(False)为Inline方式】'contentId = JMail.AddAttachment (Server.MapPath("jmail.html"), True)' 邮件主体(HTML(注意信件内链接附件的方式))JMail.HTMLBody = "     姓 名:"&request("username")&"
    区 域:"&request("location_p")&""&request("location_c")&""&request("location_a")&"
    电 话:"&request("Phone")&"
    email:"&request("email")&"
    qq:"&request("qq")&"
cache
Processed in 0.013194 Second.
"' 邮件主体(文本部分)JMail.Body = "我们的邮件采用了HTML格式,但是您的邮件查看软件可能不支持。。。邮件正文,邮件正文,邮件正文"' 发送【调用格式:objJMail.Send([username:password@]SMTPServerAddress[:Port])】JMail.Send("smtp.163.com")' 关闭并清除对象JMail.Close()Set JMail = Nothingresponse.write ""response.End()%>