主题:  极度郁闷:用jmail发送邮件 有时收得到 有时收不到?

fourfour

职务:普通成员
等级:1
金币:0.0
发贴:61
#12005/4/7 9:36:56
为什么会有些收得到,有些又收不到呢?
很是奇怪。
谢谢。

表单字段都是对的,变量名也没有错。
奇怪的是有时能收到,有时又收不到。
不会是服务器的问题吧?有时间限制? :confused:

代码如下:

<%
fqname = Request.Form ("fqname")
mqname = Request.Form ("mqname")
jzyq = Request.Form ("jzyq")
csrq_gl_year = Request.Form ("csrq_gl_year")
csrq_gl_month = Request.Form ("csrq_gl_month")
csrq_gl_day = Request.Form ("csrq_gl_day")
csrq_gl_hour = Request.Form ("csrq_gl_hour")
csrq_nl_year = Request.Form ("csrq_nl_year")
csrq_nl_month = Request.Form ("csrq_nl_month")
csrq_nl_day = Request.Form ("csrq_nl_day")
csrq_nl_hour = Request.Form ("csrq_nl_hour")
mainname = Request.Form ("mainname")
email = Request.Form ("email")
paykind = Request.Form ("paykind")
postcode= Request.Form ("postcode")
address= Request.Form ("address")
telephone= Request.Form ("telephone")
mailsubject= Request.Form ("mainname")
sex=Request.Form ("sex")
%>

<%
mess = mess & "---------------个人命名申请表开始-------------------" & vbcrlf
mess = mess & "联系人姓名:" & mainname & vbcrlf
mess = mess & "性别:" & sex & vbcrlf
mess = mess & "公历出生日期:" & csrq_gl_year & "年" & csrq_gl_month & "月" & csrq_gl_day & "日" & csrq_gl_hour & "时" & vbcrlf
mess = mess & "农历出生日期:" & csrq_nl_year & "年" & csrq_nl_month & "月" & csrq_nl_day & "日" & csrq_nl_hour & "时" & vbcrlf
mess = mess & "父亲姓名:" & fqname & vbcrlf
mess = mess & "母亲姓名:" & mqname & vbcrlf
mess = mess & "家长要求:" & jzyq & vbcrlf
mess = mess & "详细地址:" & address & vbcrlf
mess = mess & "邮编:" & postcode & vbcrlf
mess = mess & "联系电话:" & telephone & vbcrlf
mess = mess & "电子邮箱:" & email & vbcrlf
mess = mess & "汇款方式:" & paykind & vbcrlf
mess = mess & "---------------个人命名申请表结束-------------------"

SystemEmail=Request.Form ("email")
sendname=Request.Form ("mainname")
Set jmail = Server.CreateObject("JMail.Message")

JMail.Priority = 1
JMail.Silent=true
JMail.Charset = "gb2312"

jmail.MailServerUserName ="admin@XXXX.com" '输入smtp服务器验证登陆名 (邮局中任何一个用户的Email地址)
jmail.MailServerPassword = "XXXX" '输入smtp服务器验证密码 (用户Email帐号对应的密码)
jmail.From = SystemEmail '发件人Email
jmail.FromName = sendname '发件人姓名
jmail.AddRecipient "admin@XXXX.com" '收件人Email
jmail.Subject = sendname & "发来的个人命名申请表" '信件主题
jmail.Body = mess '正文
jmail.Send ("mail.XXX.com") 'smtp服务器地址(企业邮局地址)
set jmail = nothing
SendMailed = "OK"

%>

<Script language="javascript">
alert("邮件发送成功");
history.back();
</Script>