title: java mail give java.net.connectexception: connection refused
body: <p>I have the same code on windows and it works well. When i move the code to centos, it gives the exception:
  <strong>javax.mail.MessagingException: Could not connect to SMTP host: stmp.gmail.com, port: 587;
    nested exception is:
      java.net.ConnectException: Connection refused</strong></p>
  
  <p>Could anyone please give me some suggestion about this exception?</p>
  
  <p>Thank you very much.</p>