+ -
当前位置:首页 → 问答吧 → JMAIL发送邮件错误为什么?急求高手帮忙解答

JMAIL发送邮件错误为什么?急求高手帮忙解答

时间:2011-12-22

来源:互联网

在本地开发环境,使用自己的163邮件,发送邮件成功。
把代码放到服务器上,使用企业邮箱、帐号密码,发送邮件失败。
在服务器上用outlook express发送,使用企业邮箱、帐号密码可以发送成功。
在服务器上已经把McAfee工具禁用了。

代码:
<%
'发送邮件方法
sub Jmailsend(email,topic,mailbody)
  on error resume next
dim JMail,cdomail
set JMail =Server.CreateObject( "JMail.Message" )
JMail.Logging=True '启用使用日志
JMail.silent = True '屏蔽例外错误,返回FALSE跟TRUE两值
JMail.Charset="GB2312" '邮件文字的代码为简体中文
JMail.ContentType = "text/html" '邮件的格式为HTML的
JMail.AddRecipient email '邮件的收件人地址
JMail.From = "[email protected]" '发件人的地址
JMail.FromName = "Test"
JMail.Priority = 1 '邮件的紧急程序,1 为最快,5 为最慢, 3 为默认值
JMail.Subject=topic '邮件标题
JMail.Body=mailbody '邮件内容
JMail.MailServerUserName ="tina.yan" '登录邮件服务器所需的用户名
JMail.MailServerPassword ="******" '登录邮件服务器所需的密码
flag=JMail.Send("smtprelay-asp1.philips.com") '执行邮件发送(通过邮件服务器地址)
If flag=true Then
response.write "发送成功"
Else 
response.write JMail.Log
response.write "发送失败"
End If 
JMail.Close '关闭邮件对象
end sub
%>

报错信息:
The message was undeliverable. All servers failed to receive the message .execute() { Trying server mail:smtprelay-asp1.philips.com <- 220 smtprelay-asp1.philips.com ESMTP Postfix -> EHLO cnhpekcrb1ms004.code1.emi.philips.com <- 250-smtprelay-asp1.philips.com 250-PIPELINING 250-SIZE 250-ETRN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN -> AUTH LOGIN <- 502 5.5.2 Error: command not recognized Authentication failed. smtprelay-asp1.philips.com failed.. No socket for server. ConnectToServer() 1 of 1 servers failed } 发送失败

急求高手帮忙啊!!!!!

另:JMAIL组件已注册。

作者: lvjing1338337   发布时间: 2011-12-22

要ssl等设置吧?

作者: dogfish   发布时间: 2011-12-23