java mail api-not connect to smtp host

时间:2012-09-25 06:10:46

标签: java networking javamail connectexception

我正在从我们的应用程序发送邮件。使用的属性如下,

"mail.smtp.auth", "true"
"mail.smtp.host", smtp.bizmail.yahoo.com
"mail.smtp.port", 587

我们有两台linux服务器,我的问题是从一台服务器发送邮件,但是从其他服务器发送邮件。它抛出异常如下

javax.mail.SendFailedException: Sending failed;
  nested exception is:
        javax.mail.MessagingException: Could not connect to SMTP host: smtp.bizmail.yahoo.com, port: 587;
  nested exception is:
        java.net.ConnectException: Connection timed out
        at javax.mail.Transport.send0(Transport.java:219)
        at javax.mail.Transport.send(Transport.java:81)

0 个答案:

没有答案