I would like to send email using a custom proxy on apache commons email api because I'm connected to the internet through a proxy server.
I've tried using the common ways of setting proxies in java but it doesn't seem to work. e.g
System.getProperties().put("http.proxySet", "true" );
System.getProperties().put("http.proxyHost", "127.0.0.1");
System.getProperties().put("http.proxyPort", "6056");
And
System.getProperties().put("http.proxySet", "true" );
System.setProperty("http.proxyHost", "127.0.0.1");
System.setProperty("http.proxyPort", "6056");`
Thanks.