DEBUG: setDebug: JavaMail version 1.4.3 DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc] DEBUG SMTP: useEhlo true, useAuth true DEBUG SMTP: useEhlo true, useAuth true DEBUG SMTP: trying to connect to host "exch07.wiseknit.com.cn", port 25, isSSL false 220 exch07.wiseknit.com.cn Microsoft ESMTP MAIL Service ready at Wed, 16 Nov 2011 15:16:44 +0800 DEBUG SMTP: connected to host "exch07.wiseknit.com.cn", port: 25 EHLO 20111009-1950 250-exch07.wiseknit.com.cn Hello [172.168.1.172] 250-SIZE 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-STARTTLS 250-X-ANONYMOUSTLS 250-AUTH NTLM 250-X-EXPS GSSAPI NTLM 250-8BITMIME 250-BINARYMIME 250-CHUNKING 250-XEXCH50 250 XRDST DEBUG SMTP: Found extension "SIZE", arg "" DEBUG SMTP: Found extension "PIPELINING", arg "" DEBUG SMTP: Found extension "DSN", arg "" DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg "" DEBUG SMTP: Found extension "STARTTLS", arg "" DEBUG SMTP: Found extension "X-ANONYMOUSTLS", arg "" DEBUG SMTP: Found extension "AUTH", arg "NTLM" DEBUG SMTP: Found extension "X-EXPS", arg "GSSAPI NTLM" DEBUG SMTP: Found extension "8BITMIME", arg "" DEBUG SMTP: Found extension "BINARYMIME", arg "" DEBUG SMTP: Found extension "CHUNKING", arg "" DEBUG SMTP: Found extension "XEXCH50", arg "" DEBUG SMTP: Found extension "XRDST", arg "" DEBUG SMTP: Attempt to authenticate DEBUG SMTP: check mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM
DEBUG SMTP: mechanism LOGIN not supported by server DEBUG SMTP: mechanism PLAIN not supported by server DEBUG SMTP: mechanism DIGEST-MD5 not supported by server java.lang.ClassNotFoundException: jcifs/ntlmssp/Type1Message at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at com.sun.mail.auth.Ntlm.generateType1Msg(Ntlm.java:65) at com.sun.mail.smtp.SMTPTransport$NtlmAuthenticator.getInitialResponse(SMTPTransport.java:784) at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:623) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:583) at javax.mail.Service.connect(Service.java:313) at javax.mail.Service.connect(Service.java:172) at javax.mail.Service.connect(Service.java:121) at javax.mail.Transport.send0(Transport.java:190) at javax.mail.Transport.send(Transport.java:120) at EmailSender.send(EmailSender.java:103) at EmailSender.main(EmailSender.java:32) AUTH NTLM 334
java.lang.ClassNotFoundException: jcifs/ntlmssp/Type2Message at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at com.sun.mail.auth.Ntlm.generateType3Msg(Ntlm.java:105) at com.sun.mail.smtp.SMTPTransport$NtlmAuthenticator.doAuth(SMTPTransport.java:794) at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:641) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:583) at javax.mail.Service.connect(Service.java:313) at javax.mail.Service.connect(Service.java:172) at javax.mail.Service.connect(Service.java:121) at javax.mail.Transport.send0(Transport.java:190) at javax.mail.Transport.send(Transport.java:120) at EmailSender.send(EmailSender.java:103) at EmailSender.main(EmailSender.java:32) javax.mail.AuthenticationFailedException: 334
at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:648) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:583) at javax.mail.Service.connect(Service.java:313) at javax.mail.Service.connect(Service.java:172) at javax.mail.Service.connect(Service.java:121) at javax.mail.Transport.send0(Transport.java:190) at javax.mail.Transport.send(Transport.java:120) at EmailSender.send(EmailSender.java:103) at EmailSender.main(EmailSender.java:32)
java.lang.ClassNotFoundException: jcifs/ntlmssp/Type2Message 把 jcifs 的 jar 包加进去看看 ######java.lang.ClassNotFoundException: jcifs/ntlmssp/Type1Message######不行,我用qq的邮箱可以,用我们公司的就不行了,就报错了。######你们公司邮箱不行其他的126什么的怎么样,要么就是协议问题。######我想也是协议问题######
######这个是什么问题?我现在也出现了.一模一样.我加了这个包jcifs-1.3.17.jar也还是出现.why?######我是这样处理的:
1.下载javamail1.5
2.删除:<classpathentry kind="con" path="melibrary.com.genuitec.eclipse.j2eedt.core.MYECLIPSE_JAVAEE_6_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
这里面有一个javamail1.4
3.然后就OK了.
4.经测试jcifs-1.3.17.jar 这个包不是必须的.
5.另外:mcafee的查毒有点过了,不让java发邮件,添加排除或关闭设置.
over
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。