ASP用JMAIL发邮件显示成功但是却收不到邮件

我程序用JMAIL组件自动发邮件,程序都能运行完,我用断点的方式测试了,每句话都没问题,但是收信人却收不到邮件。后来经过测试发现,如果有人在别的地方远程连接我的服务器,就能收到邮件了,但是只要断开远程连接,就又不行了。我怀疑是权限问题,但是不知道在哪设置。
服务器是2003,邮件是一个叫AAMAIL的软件搭的。
重装了一遍JMAIL组件还是不成
哪位大虾能给个解决方案。
我拿人头担保,不是程序的问题。

<%
cname=request.Form("name")
cemail="[email protected]"
emailtitle="报名表"
age=request.Form("age")
bmemail=request.Form("email")
phone=request.Form("phone")
addr=request.Form("addr")
emailcontant=request.Form("content")
Set JMail = Server.CreateObject("JMail.Message")
'是否将信头编码成iso-8859-1字符集. 缺省是True
JMail.ISOEncodeHeaders = True
'如果JMail.silent设置为true,ErrorCode包含的是错误代码
JMail.Silent = True
'设置标题和内容编码,如果标题有中文,必须设定编码为gb2312
JMail.Charset = "gb2312"
'JMail.ContentType = "text/html" '如果发内嵌附件一定要注释掉这行,重要!
JMail.From = "[email protected]" ' 发送者地址
JMail.FromName = "报名单" ' 发送者姓名
JMail.MailServerUserName = "wwe2n0" ' 身份验证的用户名
JMail.MailServerPassword = "zhongguo" ' 身份验证的密码
'加入新的收件人
JMail.AddRecipient cemail, cname
'JMail.AddRecipientBCC Email '密件收件人的地址
'JMail.AddRecipientCC Email '邮件抄送者的地址
JMail.Subject = emailtitle
JMail.Body = emailcontant

'增加一个普通附件
'JMail.AddAttachment(Server.MapPath())
'增加一个嵌入式附件
' The return value of AddAttachment is used as a
' reference to the image in the HTMLBody.
'contentId = JMail.AddAttachment(Server.MapPath("images/email.gif"))

'只有HTML格式支持嵌入图片附件,我们采用HTML格式的邮件内容
' As only HTML formatted emails can contain inline images
' we use HTMLBody and appendHTML
JMail.HTMLBody = "fdasfdsfadsfasf"

'如果对方信箱不支持HTML格式邮件,我们仍需要给他一个友善的提示
' But as not all mailreaders are capable of showing HTML emails
' we will also add a standard text body
JMail.Body = "Too bad you can't read HTML-mail."
JMail.appendText " "

if JMail.Send( "smtp.163.com" ) then '执行邮件发送(通过邮件服务器地址)smtp.域名.com 不一定是邮件服务器
response.Write("邮件发送成功")
else
response.Write("邮件发送失败")
end if
JMail.Close()
Set JMail = Nothing
response.Redirect("index.asp")
%>

自己理解不明白的问我
温馨提示:答案为网友推荐,仅供参考
第1个回答  2010-01-21
不懂