JAMES SMTP Server 2.3.2
config.xml加了:
<authRequired>announce</authRequired>错误信息
DEBUG: setDebug: JavaMail version 1.3
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth trueDEBUG: SMTPTransport trying to connect to host "10.237.89.20", port 25DEBUG SMTP RCVD: 220 ebtqa.com SMTP Server (JAMES SMTP Server 2.3.2) ready Fri, 28 Dec 2012 08:25:53 -0600 (CST)DEBUG: SMTPTransport connected to host "10.237.89.20", port: 25DEBUG SMTP SENT: EHLO psc-SteveSun-01
DEBUG SMTP RCVD: 250-ebtqa.com Hello psc-SteveSun-01 (10.237.88.104 [10.237.88.104])
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-PIPELINING
250 ENHANCEDSTATUSCODESDEBUG SMTP Found extension "AUTH", arg "LOGIN PLAIN"
DEBUG SMTP Found extension "AUTH=LOGIN", arg "PLAIN"
DEBUG SMTP Found extension "PIPELINING", arg ""
DEBUG SMTP Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Attempt to authenticate
DEBUG SMTP SENT: AUTH LOGIN
DEBUG SMTP RCVD: 334 VXNlcm5hbWU6DEBUG SMTP SENT: bXN1bg==
DEBUG SMTP RCVD: 334 UGFzc3dvcmQ6DEBUG SMTP SENT: bXN1bg==
DEBUG SMTP RCVD: 235 Authentication SuccessfulSending failed;
nested exception is:
class javax.mail.AuthenticationFailedException
安全认证的代码: authenticator = new MyAuthenticator(getHostUser(), getHostPassword());
_session = Session.getInstance(prop, new Authenticator() {
protected javax.mail.PasswordAuthentication getPasswordAuthentication() {
return new javax.mail.PasswordAuthentication(getHostUser(),
getHostPassword());
}
});如何解决?谢谢
config.xml加了:
<authRequired>announce</authRequired>错误信息
DEBUG: setDebug: JavaMail version 1.3
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth trueDEBUG: SMTPTransport trying to connect to host "10.237.89.20", port 25DEBUG SMTP RCVD: 220 ebtqa.com SMTP Server (JAMES SMTP Server 2.3.2) ready Fri, 28 Dec 2012 08:25:53 -0600 (CST)DEBUG: SMTPTransport connected to host "10.237.89.20", port: 25DEBUG SMTP SENT: EHLO psc-SteveSun-01
DEBUG SMTP RCVD: 250-ebtqa.com Hello psc-SteveSun-01 (10.237.88.104 [10.237.88.104])
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-PIPELINING
250 ENHANCEDSTATUSCODESDEBUG SMTP Found extension "AUTH", arg "LOGIN PLAIN"
DEBUG SMTP Found extension "AUTH=LOGIN", arg "PLAIN"
DEBUG SMTP Found extension "PIPELINING", arg ""
DEBUG SMTP Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Attempt to authenticate
DEBUG SMTP SENT: AUTH LOGIN
DEBUG SMTP RCVD: 334 VXNlcm5hbWU6DEBUG SMTP SENT: bXN1bg==
DEBUG SMTP RCVD: 334 UGFzc3dvcmQ6DEBUG SMTP SENT: bXN1bg==
DEBUG SMTP RCVD: 235 Authentication SuccessfulSending failed;
nested exception is:
class javax.mail.AuthenticationFailedException
安全认证的代码: authenticator = new MyAuthenticator(getHostUser(), getHostPassword());
_session = Session.getInstance(prop, new Authenticator() {
protected javax.mail.PasswordAuthentication getPasswordAuthentication() {
return new javax.mail.PasswordAuthentication(getHostUser(),
getHostPassword());
}
});如何解决?谢谢
解决方案 »
- 求大神帮忙,分页问题...........
- 求一个截取字符串的方法!!!分不多求帮忙
- 如何清除JComboBox里的内容??
- 有关myeclipse问题
- tomcat可以启动但无法访问欢迎页面
- Awake通用查询框架 说明文档中遗漏的说明(复选框、主键超链用法)
- SpringMVC JUnit单元测试问题
- 请问hibernate 怎么写视图的查询啊?
- java socket与 c socket通讯的问题,请教高手,高分相送!!!!!!!!!!!
- 为什么我得分的时候,我的可用分不增加呀,只是每天增加10分??谢谢了!
- 收藏 javax.naming.NameNotFoundException: Name ds is not bound in this Context
- MyEclipse 启动 Tomcat ,控制台没反应
DEBUG SMTP RCVD: 235 Authentication Successful
为啥还会抛javax.mail.AuthenticationFailedException呢
这里你权限验证以及成功了。
然后说:
Sending failed;
nested exception is:
class javax.mail.AuthenticationFailedException你看下你的代码中是否用了Transport.send(msg)这样的方法
换成下面的试试:
Transport transport=session.getTransport();
transport.send(msg,new Address[]{new InternetAddress("[email protected]")});