Originally posted by Rene Larsen: This code is working, with the used properties set.
To enable debug when you try to send - just change "smtpSession.setDebug(false);" to "smtpSession.setDebug(true);"
public Object setProperty(String key, String value)
Calls the Hashtable method put. Provided for parallelism with the getProperty method. Enforces use of strings for property keys and values. The value returned is the result of the Hashtable call to put.
The SOCKS username and password are acquired in the following way. First, if the application has registered a java.net.Authenticator default instance, then this will be queried with the protocol set to the string "SOCKS5", and the prompt set to to the string "SOCKS authentication". If the authenticator does not return a username/password or if no authenticator is registered then the system checks for the user preferences "java.net.socks.username" and "java.net.socks.password". If these preferences do not exist, then the system property "user.name" is checked for a username. In this case, no password is supplied.
socksProxyHost socksProxyPort (default: 1080) Indicates the name of the SOCKS proxy server and the port number that will be used by the SOCKS protocol layer. If socksProxyHost is specified then all TCP sockets will use the SOCKS proxy server to establish a connection or accept one. The SOCKS proxy server can either be a SOCKS v4 or v5 server and it has to allow for unauthenticated connections.
Rene , i noticed that the proxy usename and password are missing so what are the property to set them?
As I wrote in my previous post
I have not tried to set up javamail with a proxy my self - so I don't know if it works. I think that there maybe can be an issue with logon to the proxy server - but I have not found how this is done.
I have postet a link where the username and password are defined - but again I have not tried to set up javamail with a proxy my self, so I don't know if it is working. [ September 09, 2008: Message edited by: Rene Larsen ]