I got following error with java mail on windows server 2008 R2
and 25 port
is enabled on my firewalls inbound rule:
DEBUG SMTP: trying to connect to host "XXX.XXX.XXX", port 25, isSSL false javax.mail.MessagingException: Could not connect to SMTP host: XXX.XXX.XXX, port: 25; nested exception is: java.net.ConnectException: Connection timed out: connect at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1706) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:525) 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)
Please help!!