title: Use Javamail through a proxy
body: <p>I have a Java application which uses Javamail (v.1.5.4) for send and review mails into a POP/SMTP mail server. This application must run in our coporate network, where we have a proxy (f*ck!) that blocks my requests. I have googled possible solutions and Javamail says that we can use SOCKS5:</p>
  <blockquote>
  <p>Q: How do I configure JavaMail to work through my proxy server? [updated!]</p>
  <p>A: JavaMail does not currently support accessing mail servers through a web proxy server. One of the major reasons for using a proxy server is to allow HTTP requests from within a corporate network to pass through a corporate firewall. The firewall will typically block most access to the Internet, but will allow requests from the proxy server to pass through. In addition, a mail server inside the corporate network will perform a similar function for email, accepting messages via SMTP and forwarding them to their ultimate destination on the Internet, and accepting incoming messages and sending them to the appropriate internal mail server.</p>
  </blockquote>
  <p>That solution is not valid for me, so I have to look for new alternatives. Some people say that they implements a custom <code>SocketFactory</code>, but I am not sure if that is enough. Someone has tried?</p>
  <p>Another possible solution could be use another library, but I don't find anything that could avoid this proxy.</p>
  <p>Has anyone treat this problem? How do you solve it?</p>
  <p><em><strong>Summary</strong></em></p>
  <p><strong>Problem:</strong> I have to send and read e-mails in a Java application, but my proxy blocks the requests.</p>
  <p><strong>What I have tried?</strong> Using javamail, I have tried to use SOCKS5 solution, but with no effect.</p>
  <p><strong>What I am looking for?</strong> A way to avoid this proxy. Someone tells about a custom <code>SocketFactory</code>(but I am not sure if this is valid). I don't find any alternative to Javamail.</p>
  <p>Regards!!</p>