title: Connection reset error using java mail api in eclipse
body: <p><a href="https://i.stack.imgur.com/HqnfI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HqnfI.png" alt="enter image description here"></a>
  Relevant info:-</p>
  
  <ul>
  <li>I am working on ubutnu , so no firewall issues  i hope.</li>
  <li>I am sitting behind a proxy server.</li>
  <li>I am able to connect to  smtp server through terminal using telnet.</li>
  <li>When I run the same code using gradle from terminal(you need a build tool to download the  java mail api from repository), it works fine.</li>
  <li>I have included the mail api in external jars in my eclipse project and even tried setting/unsetting  the proxy in eclipse, even then it's not working.  </li>
  </ul>