Thanks,
Sherif
Regards, Rene Larsen
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);"
Thanks,
Sherif
Regards, Rene Larsen
Thanks,
Sherif
Regards, Rene Larsen
Regards, Rene Larsen
Originally posted by Rene Larsen:
And the code I have posted is working with Google mail - you can just use your own mail username and password![]()
Thanks,
Sherif
Regards, Rene Larsen
Thanks,
Sherif
Thanks,
Sherif
Originally posted by Sherif Shehab:
i tried ping smtp.gmail.com this was the reply
Ping request could not find host smtp.gmail.com. Please check the name and try again.
Regards, Rene Larsen
Originally posted by Sherif Shehab:
Rene , i just remembered that I'm behind a proxy do you think this may effect on me ?
Regards, Rene Larsen
Thanks,
Sherif
Originally posted by Rene Larsen:
Yes
Thanks,
Sherif
Regards, Rene Larsen
Thanks,
Sherif
Normally, if you ask question like this. people like to answer you
Properties props = System.getProperties();
props.setProperty("proxySet","true");
props.setProperty("ProxyHost","192.168.155.1");
props.setProperty("ProxyPort","1080");
or set the HTTP proxy host and port
Properties props = System.getProperties();
props.setProperty("proxySet","true");
props.setProperty("http.proxyHost","192.168.155.1");
props.setProperty("http.proxyPort","808");
But above codes will not working with javamail.
well, what should you do,
here is the solution that you can send mail through a proxy server
Properties p = System.getProperties();
p.setProperty("proxySet","true");
p.setProperty("socksProxyHost","192.168.155.1");
p.setProperty("socksProxyPort","1080");
Regards, Rene Larsen
SOCKS protocol support settings
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.
Regards, Rene Larsen
Originally posted by Rene Larsen:
No, as I read it you need to use 'socksProxy*'
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.
Thanks,
Sherif
Originally posted by Sherif Shehab:
Rene , i noticed that the proxy usename and password are missing so what are the property to set them?
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.
Regards, Rene Larsen
yeah, but ... what would PIE do? Especially concerning this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|