commons-mail报错,提示EmailException: Sending the email to the following server failed
来源:互联网 发布:华为悦盒怎么设置网络 编辑:程序博客网 时间:2024/06/06 00:03
org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.163.com:25
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1421)
at org.apache.commons.mail.Email.send(Email.java:1448)
at com.seven.mail.test.EmailUtils.sendEmail(EmailUtils.java:30)
at com.seven.test.mail.MailTest.testSendMail(MailTest.java:12)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: com.sun.mail.smtp.SMTPSendFailedException: 554 DT:SPM smtp2, DNGowED53kaTYMlVZzggAQ--.3323S2 1439260820 http://mail.163.com/help/help_spam_16.htm?ip=223.202.116.5&hostid=smtp2&time=1439260820
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2202)
at com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:1980)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1197)
at javax.mail.Transport.send0(Transport.java:254)
at javax.mail.Transport.send(Transport.java:124)
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1411)
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1421)
at org.apache.commons.mail.Email.send(Email.java:1448)
at com.seven.mail.test.EmailUtils.sendEmail(EmailUtils.java:30)
at com.seven.test.mail.MailTest.testSendMail(MailTest.java:12)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: com.sun.mail.smtp.SMTPSendFailedException: 554 DT:SPM smtp2, DNGowED53kaTYMlVZzggAQ--.3323S2 1439260820 http://mail.163.com/help/help_spam_16.htm?ip=223.202.116.5&hostid=smtp2&time=1439260820
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2202)
at com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:1980)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1197)
at javax.mail.Transport.send0(Transport.java:254)
at javax.mail.Transport.send(Transport.java:124)
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1411)
... 26 more
解决:真正的原因是因为代码中没有setSubject或者设置subject内容为空造成的。
0 8
- commons-mail报错,提示EmailException: Sending the email to the following server failed
- Java Mail 发送邮件失败问题:Sending the email to the following server failed
- 发送邮件失败:Sending the email to the following server failed
- Sending the email to the following server failed : smtp.exmail.qq.com:465
- 163邮箱本地测试发送邮件成功服务器报Sending the email to the following server failed : smtp.163.com:25
- 发送邮件时候遇到了这样的一个错误!Sending the email to the following server failed : smtp.163.com:25
- SVN报错Cleanup failed to process the following paths
- svn-clearup 报错的处理(Cleanup failed to process the following paths...)
- Xcode SVN 报错 The server certificate failed to verify.
- XMLHttpRequest - Sending a Request to the Server
- 解决MVC添加区域(Area)报错failed to render template because of the following errors
- SQL Server 2008 R2 安装程序 Upgrade Failed due to the following Error.The error code is :-2147467259.Mes
- the email title about automatic to send invoice by mail
- 用catalog连接sde(直连)报错:Failed to connect to the specified server. Operation Failed
- failed due to the following error: 80070005解决办法. (转)
- failed due to the following error: 80070005解决办法
- SVN问题:Cleanup failed to process the following paths: xxxxxx
- SVN Cleanup failed to process the following paths
- iptables工具
- 【Android进阶篇】WebView显示网页详解
- Spring原理概述
- 高通的ril
- 浅谈信息无障碍人才的培养
- commons-mail报错,提示EmailException: Sending the email to the following server failed
- 20-IO流-04-IO流(字符流-FileWriter-细节(换行和续写))
- Java object类型转换为int类型
- 如何精心设计CDN架构?
- 反射调用切换语言
- 游戏的主要逻辑
- 图结构练习——最短路径
- Gerrit简单使用
- 浅解点击劫持与注入攻击