File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection refused

 
yogesh naravane
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
usage:java GetMessageExample host username password
e.g. java GetMessageExample www.yahoo.com <username> <password>
error:Connection refused
In the program i am using following lines:
// Get the store
Store store = session.getStore("imap");//("pop3");
store.connect(host, username, password);
is the error in above code .Also if i use pop3 gives error as
NoSuchProvider for pop3.
what should i do?
 
Carl Trusiak
Sheriff
Posts: 3340
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hum, only a guess because I'm not familiar with yahoo's server. However my provider www.kiski.net is the address for the http site. The address for the mail server is kiski.net. change your call to
java GetMessageExample yahoo.com < username> < password>
Let me know the results.
 
yogesh naravane
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
C:\yogesh>java GetMessageByPop3 128.11.68.63 <username> <password>
Exception in thread "main" java.net.NoRouteToHostException: Operation timed out:
no further information
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:312)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:125)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:112)
at java.net.Socket.<init>(Socket.java:273)
at java.net.Socket.<init>(Socket.java:100)
at injektilo.net.Pop3Connection.open(Pop3Connection.java:182)
at GetMessageByPop3.main(GetMessageByPop3.java:18)
what might be the error.
i am using injektilo pop3 server
the code contains pop3.open(mail.server.com);
is error in above line?
 
Carl Trusiak
Sheriff
Posts: 3340
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


the code contains pop3.open(mail.server.com);
is error in above line?

Without seeing the rest of the code, That would be my assumption. I had expected something along the lines of
pop3.open(args[0]);
Please post more of your code, If it's too big for the forum, zip it up and email it to me and I'll take a look see
 
yogesh naravane
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
NoRoutetoHostException error encountered
i am using injektilo pop3 server
 
yogesh naravane
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
NoRoutetoHostException error encountered
i am using injektilo pop3 server
pop3.connect(pop.mail.yahoo.com);
gives following error www.siski.com is not working for my application

------------------
 
Carl Trusiak
Sheriff
Posts: 3340
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by yogesh naravane:
NoRoutetoHostException error encountered
i am using injektilo pop3 server
pop3.connect(pop.mail.yahoo.com);
gives following error www.siski.com is not working for my application


I don't know if Yahoo is a POP3 host! Thats what you are trying to connect to. In order to run this they way it looks like you are trying, the host that you connect to must be a POP3 Host. If
you have a injektilo pop3 server that's what you need to connect to not Yahoo. Yahoo as far as I know is strictly HTTP and not POP3.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic