Answer the question
In order to leave comments, you need to log in
Java mail proxy usage?
I need to send a message (smtp) using a proxy, below is the code, proxies are completely ignored, what to do?
Properties props = new Properties();
System.setProperty("mail.socket.debug", "true");
props.put("mail.socket.debug", "true");
if (_config.getIsProxy()) {
props.put("mail.smtp.socks.host", proxyHost);
props.put("mail.smtp.socks.port", proxyPost);
}
props.put("mail.smtp.timeout", _config.getTimeout()*1000);
props.put("mail.smtp.connectiontimeout", _config.getTimeout()*1000);
props.put("mail.smtp.ssl.enable", "true");
props.put("mail.store.protocol", "smtp");
props.put("mail.smtp.host", server);
props.put("mail.smtp.socketFactory.port", "465");
props.put("mail.smtp.socketFactory.class",
"javax.net.ssl.SSLSocketFactory");
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.port", "465");
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question