title: Connecting microsoft Exchange server with java
body: <p>I have a problem in connecting microsoft exchange server active directory with java using Java Mail. it is throwing an exception</p>
  
  <blockquote>
    <p>javax.mail.MessagingException: No login methods supported!;</p>
  </blockquote>
  
  <p>or sometimes</p>
  
  <blockquote>
    <p>com.sun.mail.iap.ConnectionException: 220</p>
  </blockquote>
  
  <p>i just want a simple idea to how to actually connect with an exchange server active dirrectory.</p>