Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Connection refused

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
NoRoutetoHostException error encountered
i am using injektilo pop3 server
 
yogesh naravane
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
For my next trick, I'll need the help of a tiny ad ...
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic