JavaMail does not currently support access to mail servers through a web proxy server. One of the main reasons for using a proxy server is to allow HTTP requests from the corporate network to pass through the corporate firewall. The firewall, as a rule, blocks most access to the Internet, but allows you to skip requests from the proxy server. In addition, the mail server within the corporate network will perform a similar function for e-mail, receive messages via SMTP and forward them to the final destination on the Internet and receive incoming messages and send them to the corresponding internal mail server.
- SOCKS V4 V5 (http://www.socks.nec.com/aboutsocks.html, RFC1928) , , Java TCP SOCKS. . socksProxyHost socksProxyPort. , JavaMail. , : java -DsocksProxyHost=myproxy .... SMTP, IMAP POP3- JavaMail - SOCKS. , TCP - SOCKS, .
SOCKS, JavaMail , , . JavaMail - - HTTP.