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组件已注册。
把代码放到服务器上,使用企业邮箱、帐号密码,发送邮件失败。
在服务器上用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
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28