title: javax.mail.MessagingException: Could not connect to SMTP host with windows server 2008R2
body: <p>I got following error with <code>java mail on windows server 2008 R2</code> and <code>25 port</code> is enabled on my firewalls inbound rule:</p>
  
  <blockquote>
    <p>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)</p>
  </blockquote>
  
  <p>Please help!!</p>