Hi I am a novice, working on a mail sender though proxy. I read Java mail FAQ in http://java.sun.com/products/javamail/FAQ.html#proxy.
And also I found a snippet in below therad.
http://forums.sun.com/thread.jspa?threadID=615715&start=0&tstart=0
<QUOTE>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");
</QUOTE>
I installed CCProxy in my machine and gave my own IP address ( 1. LAN IP and 2. IP from whatismyip.com; both works ) and port number. It works. But I gave IP addrss of my friend ( 1. LAN IP and 2. IP from whatismyip.com; both
NONE work ) who got CCProxy and in his machine. But doesnt work ( throws Below exception).
..............
Exception in thread "main" javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;
nested exception is:
java.net.SocketException: Can't connect to SOCKS proxy:Connection timedout: connect
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1391)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412)
at javax.mail.Service.connect(Service.java:310)
..........
.
His IP address is found with whatismyip.com. I guess its a problem with IP address. What am I doing wrong here ?? Could some one help me out please ?
Edited by: baskark on Mar 8, 2009 6:26 PM
Edited by: baskark on Mar 8, 2009 6:44 PM