com.sun.mail.util.MailConnectException: Couldn’t connect to host, port: host, 25; timeout -1; nested exception is: java.net.UnknownHostException: host

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via howtodoinjava.com by Unknown author, 1 year ago
Couldn’t connect to host, port: host, 25; timeout -1; nested exception is: java.net.UnknownHostException: host
via Stack Overflow by Susie
, 1 year ago
Couldn't connect to host, port: smtp.gmail.com, 465; timeout -1; nested exception is: java.net.ConnectException: Connection timed out: connect
via Stack Overflow by Nirmala Madusanka
, 9 months ago
Couldn't connect to host, port: smtp.gmail.com, 465; timeout -1; nested exception is: java.net.SocketException: Permission denied: connect
via Coderanch by Neha Sud, 8 months ago
Couldn't connect to host, port: 172.31.1.6:8090, 25; timeout -1; nested exception is: java.net.UnknownHostException: 172.31.1.6:8090
via blogspot.com by Unknown author, 1 year ago
Couldn't connect to host, port: localhost, 25; timeout -1; nested exception is: java.net.ConnectException: Connection refused: connect
via Stack Overflow by Sarpy
, 1 year ago
Couldn't connect to host, port: localhost, 25; timeout -1; nested exception is:
java.net.UnknownHostException: host
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:158)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:154)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:380)
at java.net.Socket.connect(Socket.java:569)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:569)
at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:160)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:301)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:208)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1950)

Users with the same issue

9 times, 2 days ago
Once, 5 days ago
Once, 1 week ago
3 times, 1 week ago
Once, 1 month ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.