title: Validate smtp server credentials using java without actually sending mail
body: <p>To verify smtp server credentials shall I use <code>transport.connect()</code>?</p>
  
  <pre><code>Session session = Session.getInstance(properties,authenticator);
  
   Transport tr=session.getTransport("smtp");
  
   tr.connect();
  </code></pre>
  
  <p>Is it correct method to check smtp server credentials?</p>