(在线等待)关于ASP自动发送邮件的问题!
下面的代码是我注册后发送邮件的代码,测试时说是成功发送了,也没有什么错误信息,可是信箱里就是收不到信件,不知道这是为什么,无奈中。。。
请各位高帮在下看看代码中是否存在问题,jmail已经成功注册了!
<!--#include file=conn1.asp-->
<!--#include file=err.asp-->
<!--#include file=ipt.asp-->
<!--#include file=md5.asp-->
<!--#include file=mail.asp-->
<!--#include file="config.asp"-->
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=title%>-会员注册成功</title>
<link href="inc_style.css" rel="stylesheet" type="text/css">
</head>
<%dim action
action=request("action")
if action<>"yes" then
response.redirect "regterm.asp"
response.end
end if
%>
<SCRIPT language=javascript>
function CheckForm()
{
if(document.thisForm.username.value.length<1)
{
alert("用户名不能为空!");
return false;
}
if(document.thisForm.password.value.length<1)
{
alert("密码不能为空!");
return false;
}
}
</SCRIPT>
<%
dim username,password,hangye,comname,jianjie,name,Sex,idcard,dianhua,chuanzhen,qq,dizhi,email,rs3,diqu
dim comlogo,banner,xxpic
dim rs,sql,rs2,sql2
username=trim(request("comusername"))
password=request("compassword")
email=request("comemail")
hangye=trim(request("hangye"))
diqu=trim(request("diqu"))
comname=trim(request("com"))
jianjie=request("comabout")
name=trim(request("comname"))
idcard=trim(request("comidcard"))
Sex=trim(request("Sex"))
dianhua=trim(request("comdianhua"))
chuanzhen=trim(request("comfax"))
qq=trim(request("qq"))
dizhi=trim(request("comdizhi"))
comlogo=trim(request("logo"))
banner=trim(request("banner"))
xxpic=trim(request("xxpic"))
chkcnmai(username)
chkcnmai(name)
if nothaveChinese(username)=false then
call errcnmai(3)
response.end
end if
if IsValidemail(email)=false then
call errcnmai(1)
response.end
end if
if not isnumeric(idcard) or len(idcard)<15 or len(idcard)>18 then
call errcnmai(6)
response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select * from [user] where username='"&username&"'"
rs.open sql,conn,1,3
set rs2=server.createobject("adodb.recordset")
sql2="select * from [shangjia] where comname='"&comname&"'"
rs2.open sql2,conn,1,3
if (rs.eof or rs.bof) AND (rs2.eof or rs2.bof) then
rs.addnew
rs("username")=username
rs("password")=md5(password)
rs("name")=name
rs("email")=email
rs("idcard")=idcard
rs("Sex")=Sex
rs("diqu")=cint(diqu)
rs("dianhua")=dianhua
rs("qq")=qq
rs("dizhi")=dizhi
rs("zcdata")=now()
rs("a")=z_a
rs("b")=z_b
rs("c")=z_c
rs("d")=z_d
rs("jf")=jf_1
rs("hb")=z_hb
rs("diqu")=diqu
rs2.addnew
rs2("comname")=comname
rs2("hangye") =hangye
rs2("diqu")=cint(diqu)
rs2("intro")=jianjie
rs2("admin")=username
rs2("logo")=comlogo
rs2("banner")=banner
rs2("xxpic")=xxpic
rs2("chuanzhen")=chuanzhen
rs2.update
sql2="select id from [shangjia] where comname='"&comname&"'"
set rs3=server.createobject("adodb.recordset")
sql2="select id from [shangjia] where comname='"&comname&"'"
rs3.open sql2,conn,1,3
rs("shangjiaid")=rs3("id")
rs.update
%>
<body>
<!--#include file=top.asp-->
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="768" height="245" align="center">
<tr>
<td>
<table width="489" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" align="center">
<tr>
<td width="16"><img src="images/obj_waku3_01.gif"></td>
<td width="456"><img src="images/ba_home.gif"></td>
<td width="17"><img src="images/obj_waku3_02.gif"></td>
</tr>
<tr>
<td width="16" background="images/obj_waku3_03.gif"> </td>
<td width="456" bgcolor="#EEEEEE">
<table width="454" border="0" cellspacing="0" cellpadding="0" height="120">
<tr>
<td height="19" bgcolor="#EEEEEE" width="454">
<p align="center" style="line-height: 200%; margin-top: 0; margin-bottom: 0">
<font size="3">恭喜<%=name%>(商家用户)!<b><font color="#FF0000">注册成功了!</font></b></font></td>
</tr>
<tr>
<td height="19" bgcolor="#EEEEEE" width="454">
<li>
<p align="center"><font size="3"> </font><font size="2">我们同时将密码发送到了|<b><font color=""#ff0000""><%=email%></font></b>|,请保管好您的密码</font></p>
<table class="font_10_e_black" cellspacing="0" cellpadding="3" width="98%" align="center" border="0">
<form id="f1" name="thisForm" action="Loginchk.asp" method="POST">
<tr>
<td width="50%" align="right">登陆帐号:<input class="form_e_10_black" id="username" maxlength="20" size="16" name="username" value="<%=username%>">
</td>
<td width="50%" align="center"> </td>
</tr>
<tr>
<td align="right">登陆密码:<input class="form_e_10_black" id="password" maxlength="32" size="16" value="<%=password%>" name="password" type="password">
</td>
<td align="center"> </td>
</tr>
<%if yzm="1" then%>
<tr>
<td align="center" width="67%">
<p align="right">验 证 码:<input class=wenbenkuang name=verifycode type=text value="<%If GetCode=9999 Then Response.Write "9999" end if%>" maxLength=4 size=16></td>
<td align="center">
<p align="left">
<img src=GetCode.asp width="58" height="19"></td>
</tr>
<%end if%>
<tr>
<td align="center" colspan="2">
<input onClick="javascript:return CheckForm();" type="image" src="images/mail_login_r5_c2.gif" border="0" name="I3">
</td>
</tr>
</form>
</table></td>
</tr>
</table></td>
<td width="17" background="images/obj_waku3_04.gif"> </td>
</tr>
<tr>
<td width="16"><img src="images/obj_waku3_05.gif"></td>
<td width="456"><img src="images/obj_waku3_06.gif"></td>
<td width="17"><img src="images/obj_waku3_07.gif"></td>
</tr>
<tr>
<td width="489" colspan="3">您所注册的商户需要我们在24小时内审核通过!但在审核通过之前,您可以以个人会员身份登录网站。<br>
<font color="#FF0000">不被通过的可能:<br>★您的基本资料不完整或不吻合<br>★店铺物品/信息数量小于等于5件/条<br>★您的信息资料有重大欺骗性质</font></td>
</tr>
</table>
</td>
</tr>
</table>
<!--#include file=end.htm-->
<%
call mail()
else
if trim(rs("email"))=email then
call errcnmai(23)
response.end
end if
if trim(rs("username"))=username then
response.write "67868"
call errcnmai(22)
response.end
end if
if trim(rs2("comname"))=comname then
call errcnmai(31)
response.end
end if
call errcnmai(24)
response.end
end if
set rs=nothing
set rs2=nothing
set rs3=nothing
sub mail()
dim mailbody,Jmail
mailbody="欢迎您,来自"&comname&"的"&username&"!<br>恭喜您成为<a target=_blank href="&web&">"&title&"</a>的商家会员!<br>您的登陆帐号:"&username&"<br>您的登陆密码:"&password&"<br><br>登陆地址为:<a target=_blank href="&web&">"&web&"</a><br>["&title&"]<br>"&tel&""
Set Jmail=server.createobject("Jmail.Message")
Jmail.Charset ="gb2312"
Jmail.Silent =true
JMail.ContentType = "text/html"
Jmail.Priority = 3
Jmail.MailServerUserName = mailname
Jmail.MailServerPassword = mailpass
Jmail.From = mailform
Jmail.FromName =""&title&"管理员"
Jmail.Subject ="恭喜你注册成功,请查收登陆帐号!"
Jmail.AddRecipient ""&email&""
Jmail.Body = mailbody
Jmail.Send(mailsmtp)
Set Jmail=nothing
end sub
%>