做了一个asp预约系统,使用JMail邮件发送到我的163邮箱,提交表单时显示成功,可是邮箱收不到提交的邮件
这是代码望各位大侠指教小弟<!--#includefile="conn.asp"--><%RandomizeTimer'检查验证码dimnamename=GetParam...
这是代码望各位大侠指教小弟
<!--#include file="conn.asp" -->
<%
Randomize Timer
'检查验证码
dim name
name=GetParam("name","str")
dim date
date=GetParam("date","str")
dim photo
photo=GetParam("photo","str")
dim sex
sex=GetParam("sex","str")
dim number
number=GetParam("number","str")
dim qq
qq=GetParam("qq","str")
dim email
email=GetParam("email","str")
dim remarks
remarks=GetParam("remarks","str")
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from [order] ",conn,2,3
rs.addnew
rs("name")=name
rs("sex")=sex
rs("date")=date
rs("photo")=photo
rs("sex")=sex
rs("number")=number
rs("email")=email
rs("qq")=qq
rs("email")=email
rs("remarks")=remarks
rs("time")=now()
rs.update
rs.close
set rs=nothing
closeconn
%>
<%
sub SendMail(PAddRecipient,PSubject,PBody) '接收人地址PAddRecipient|邮件主题PSubject|邮件内容PBody
set JMail=server.CreateObject("JMail.Message")
Jmail.Silent=true
Jmail.Charset="gb2312"
Jmail.ContentType="text/html"
Jmail.SimpleLayout=false
Jmail.Priority=1
Jmail.AddRecipient PAddRecipient '收件地址
Jmail.Subject=PSubject '邮件主题
Jmail.Body=PBody '邮件内容
Jmail.From="a@163.com" '发送地址
Jmail.FromName="a在线预约" '发送签名
Jmail.MailServerUserName="a@163.com" '发件帐号,必须存在这个帐号
Jmail.MailServerPassWord="abc" '发件密码
Jmail.Send("smtp.163.com") '发送邮件
Jmail.Close
end sub
if request.form("ok")<>"" then
name=request.form("name")
sex=request.form("sex")
date=request.form("date")
photo=request.form("photo")
number=request.form("number")
qq=request.form("qq")
email=request.form("email")
remarks=request.form("remarks")
url=Request.ServerVariables("SERVER_name")
mailbody=name & "<br>" & sex & "<br>" & date & "<br>" & photo & "<br>" & number & "<br>" & qq & "<br>" & email & "<br>" & remarks
SendMail "a@163.com","邮件测试",mailbody
else
response.write"<script language='javascript'>alert('邮件发送成功!');history.go(-1); </script>"
response.End()
end if
%> 展开
<!--#include file="conn.asp" -->
<%
Randomize Timer
'检查验证码
dim name
name=GetParam("name","str")
dim date
date=GetParam("date","str")
dim photo
photo=GetParam("photo","str")
dim sex
sex=GetParam("sex","str")
dim number
number=GetParam("number","str")
dim qq
qq=GetParam("qq","str")
dim email
email=GetParam("email","str")
dim remarks
remarks=GetParam("remarks","str")
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from [order] ",conn,2,3
rs.addnew
rs("name")=name
rs("sex")=sex
rs("date")=date
rs("photo")=photo
rs("sex")=sex
rs("number")=number
rs("email")=email
rs("qq")=qq
rs("email")=email
rs("remarks")=remarks
rs("time")=now()
rs.update
rs.close
set rs=nothing
closeconn
%>
<%
sub SendMail(PAddRecipient,PSubject,PBody) '接收人地址PAddRecipient|邮件主题PSubject|邮件内容PBody
set JMail=server.CreateObject("JMail.Message")
Jmail.Silent=true
Jmail.Charset="gb2312"
Jmail.ContentType="text/html"
Jmail.SimpleLayout=false
Jmail.Priority=1
Jmail.AddRecipient PAddRecipient '收件地址
Jmail.Subject=PSubject '邮件主题
Jmail.Body=PBody '邮件内容
Jmail.From="a@163.com" '发送地址
Jmail.FromName="a在线预约" '发送签名
Jmail.MailServerUserName="a@163.com" '发件帐号,必须存在这个帐号
Jmail.MailServerPassWord="abc" '发件密码
Jmail.Send("smtp.163.com") '发送邮件
Jmail.Close
end sub
if request.form("ok")<>"" then
name=request.form("name")
sex=request.form("sex")
date=request.form("date")
photo=request.form("photo")
number=request.form("number")
qq=request.form("qq")
email=request.form("email")
remarks=request.form("remarks")
url=Request.ServerVariables("SERVER_name")
mailbody=name & "<br>" & sex & "<br>" & date & "<br>" & photo & "<br>" & number & "<br>" & qq & "<br>" & email & "<br>" & remarks
SendMail "a@163.com","邮件测试",mailbody
else
response.write"<script language='javascript'>alert('邮件发送成功!');history.go(-1); </script>"
response.End()
end if
%> 展开
展开全部
mail.AddRecipient PAddRecipient '收件地址
Jmail.Subject=PSubject '邮件主题
Jmail.Body=PBody '邮件内容
Jmail.From="a@163.com" '发送地址
Jmail.FromName="a在线预约" '发送签名
Jmail.MailServerUserName="a@163.com" '发件帐号,必须存在这个帐号
Jmail.MailServerPassWord="abc" '发件密码
Jmail.Send("smtp.163.com") '发送邮件
这些你都没修改啊
Jmail.Subject=PSubject '邮件主题
Jmail.Body=PBody '邮件内容
Jmail.From="a@163.com" '发送地址
Jmail.FromName="a在线预约" '发送签名
Jmail.MailServerUserName="a@163.com" '发件帐号,必须存在这个帐号
Jmail.MailServerPassWord="abc" '发件密码
Jmail.Send("smtp.163.com") '发送邮件
这些你都没修改啊
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询