0

尝试通过 IDM 应用程序发送电子邮件时出现此异常:

javax.mail.MessagingException: Connection error (java.net.UnknownHostException: not-existing)
    at org.apache.geronimo.javamail.transport.smtp.SMTPConnection.protocolConnect(SMTPConnection.java:161) ~[geronimo-javamail_1.4_provider-1.8.3.jar:1.8.3]
    at org.apache.geronimo.javamail.transport.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:165) ~[geronimo-javamail_1.4_provider-1.8.3.jar:1.8.3]
    at javax.mail.Service.connect(Service.java:251) ~[geronimo-javamail_1.4_spec-1.7.1.jar:1.7.1]
    at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:389) ~[spring-context-support-3.2.2.RELEASE.jar:3.2.2.RELEASE]
    ... 74 common frames omitted
Caused by: java.net.UnknownHostException: not-existing
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178) ~[na:1.7.0_21]
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391) ~[na:1.7.0_21]
    at java.net.Socket.connect(Socket.java:579) ~[na:1.7.0_21]
    at java.net.Socket.connect(Socket.java:528) ~[na:1.7.0_21]
    at java.net.Socket.<init>(Socket.java:425) ~[na:1.7.0_21]
    at java.net.Socket.<init>(Socket.java:280) ~[na:1.7.0_21]
    at org.apache.geronimo.javamail.util.MailConnection.getConnectedSocket(MailConnection.java:307) ~[geronimo-javamail_1.4_provider-1.8.3.jar:1.8.3]
    at org.apache.geronimo.javamail.util.MailConnection.getConnection(MailConnection.java:250) ~[geronimo-javamail_1.4_provider-1.8.3.jar:1.8.3]
    at org.apache.geronimo.javamail.transport.smtp.SMTPConnection.protocolConnect(SMTPConnection.java:140) ~[geronimo-javamail_1.4_provider-1.8.3.jar:1.8.3]
    ... 77 common frames omitted

备注:我配置了一个postfix服务器来接收本地消息,但是我不明白这个异常的含义

4

1 回答 1

1

尝试查询 DNSnslookup以检查主机是否确实存在。或检查您使用的服务器名称。

于 2013-06-03T10:15:40.140 回答