Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

problem of connection to mail server by smtp

  Asked By: Joel    Date: Nov 28    Category: Java    Views: 954
  

I have an problem of connection to mail server by smtp. I am having proxy
serverin my LAN to connect to internet.
When i run my server it says unable to find the host "smtp.mail.yahoo.com"
Please any one help me by sending the program how to connenct to mail server
using smtp and with proxy server.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Ruairidh Anderson     Answered On: Nov 28

set the System properties below and then try

String lStrhttpHost = "http.proxyHost:";
String lStrhttpPort = "http.proxyPort:";
String lStrhttpsHost = "https.proxyHost:";
String lStrhttpsPort = "https.proxyPort:";
System.setProperty(lStrhttpHost, httpProxyIP);
System.setProperty(lStrhttpPort, httpProxyPort);
System.setProperty(lStrhttpsHost, httpsProxyIP);
System.setProperty(lStrhttpsPort, httpsProxyPort);

now you are able to connect  to http
if your proxy  supports the socks the sets the socks
properties:
System.setProperty("socks.proxyHost", proxyHost);
System.setProperty("socks.proxyPort", proxyPort);

 
Answer #2    Answered By: Jay Richards     Answered On: Nov 28

There is some proxy connection  code in the java source at:
www.quantumhyperspace.com/.../viewCode.jsp\
eader.java

 
Didn't find what you were looking for? Find more on problem of connection to mail server by smtp Or get search suggestion and latest updates.




Tagged: