title: javax.mail.MessagingException: Could not connect to SMTP host: smtp.live.com, port: 587
body: <p>I've implemented a code that sends e-mails using Outlook server (worked fine locally).</p>
  
  <p>What's the cause of the following exception on my production environment and how do I resolve it?</p>
  
  <blockquote>
    <p>javax.mail.MessagingException: Could not connect to SMTP host: smtp.live.com, port: 587; nested exception is: java.net.ConnectException: Connection timed out</p>
  </blockquote>