发送邮件出错,帮我看看,谢谢 400 请求报错 -问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文

发送邮件出错,帮我看看,谢谢 400 请求报错 

kun坤 2020-05-30 14:30:03 115

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)

分享到
取消 提交回答
全部回答(1)
  • kun坤
    2020-05-30 14:30:11

    java.lang.ClassNotFoundException: jcifs/ntlmssp/Type2Message jcifs 的 jar 包加进去看看 ######java.lang.ClassNotFoundException: jcifs/ntlmssp/Type1Message######不行,我用qq的邮箱可以,用我们公司的就不行了,就报错了。######你们公司邮箱不行其他的126什么的怎么样,要么就是协议问题。######我想也是协议问题######

    java.lang.ClassNotFoundException: jcifs/ntlmssp/Type2Message很明显少 jcifs.jar包嘛

    ######这个是什么问题?我现在也出现了.一模一样.我加了这个包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

    0 0
云计算
使用钉钉扫一扫加入圈子
+ 订阅

时时分享云计算技术内容,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。

推荐文章