下面是我的代码可怎么也发送不成功
'表单页面
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<form action="addfeedback.asp" method="post">
<tr>
<td width="18%" height="40" align="right">您的邮箱地址:</td>
<td width="82%" height="20"><input type="text" name="sendemail" size="25"/>
<span class="STYLE1"> *</span></td>
</tr>
<tr>
<td width="18%" height="40" align="right">您的姓名:</td>
<td width="82%" height="20"><input type="text" name="userName" size="25"/>
<span class="STYLE1">*</span></td>
</tr>
<tr>
<td height="40" align="right">联系地址:</td>
<td height="20"><input type="text" name="Address" size="25" /></td>
</tr>
<tr>
<td height="40" align="right">联系电话:</td>
<td height="20"><input type="text" name="Tel" size="25"/></td>
</tr>
<tr>
<td height="40" align="right">反馈内容:</td>
<td height="20"><span class="STYLE1">
<textarea name="content" cols="60" rows="12"></textarea>
*</span></td>
</tr>
<tr>
<td height="40" align="right"> </td>
<td align="left"><input name="imageField" type="submit" value=" 提 交 " align="middle" width="200" height="19" border="0" onclick="javascript:return checksignup()" />
<input name="cannle" type="reset" onClick="javascript:window.location" value=" 重 置 " align="middle" width="200" height="19" border="0"../index""></td>
</tr>
</form>
</table>
'发送页面addfeedback.asp
<%
sub Jmail1(email,bt,nr)
on error resume next
Set JMail=Server.CreateObject("JMail.SMTPMail")
JMail.Charset = "gb2312"
JMail.ContentType = "text/html"
JMail.Sender = adminmail
JMail.SenderName = my_name
JMail.Subject = bt
JMail.MailServerUserName = ""&mailb&"" '身份验证的用户名
JMail.MailServerPassword = ""&mailc&"" ' 身份验证的密码
JMail.Priority = 1
JMail.AddRecipient(""&email&"")
MailBody = "<html><head><META content=zh-cn http-equiv=Content-Language><meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312""><style type=text/css>BODY {FONT-SIZE: 9pt}</style></head><body>"
MailBody = MailBody & nr
MailBody = MailBody & "</body></html>"
JMail.Body = MailBody
JMail.silent = true
JMail.Execute
JMail.Close
Set JMail = Nothing
end Sub
'smtp发信调用方法smtp email,bt,nr
sub smtp(email,bt,nr)
Set objMail = Server.CreateObject("CDONTS.NEWMAIL")
With objMail
.From = adminmail '邮件发件人的地址
.To = email '邮件收件人的地址
.Subject =bt '邮件的标题
.Body =nr '邮件的内容
.MailFormat=0
.BodyFormat=0
.Send '执行邮件发送
End With
Set objMail = Nothing '关闭对象
end sub
'发注册信
if request("sendemail")<>"" then
html="<html><head><title>感谢您"&request("sendemail")&"的注册</title><meta http-equiv=Content-Type content=text/html; charset=gb2312></head><body bgcolor=#FFFFFF text=#000000>"
html=html&"这里是邮件内容<br>"
nr=html&"<br><br></body></html>"
email = "接收邮箱的邮箱"
bt = "会员注册成功"
adminmail="发送邮件的邮箱"
mailserver="1"
my_name="网站名"
mailb="此处为发件箱用户名"
mailc="此处为发件箱密码"
if mailserver="0" then
smtp email,bt,nr
elseif mailserver="1" then
Call jmail1(email,bt,nr)
end if
end If
'发信结束
'此处我测试是用我自己的一个邮箱发送到我的另一个邮箱,表单的内容我都可以写到邮件正文里。
%>