• 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

MessagingException: Connect failed

 
Ranch Hand
Posts: 73
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ashish, we don'thave too many rules around here, but we do ask that you BeForthrightWhenCrossPostingToOtherSites

http://forums.oracle.com/forums/thread.jspa?threadID=2250539
 
Ashish Agre
Ranch Hand
Posts: 73
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JavaMail posted question in another forum but yet to receive any answer, can anybody please help me out here.....
As this is only cmd-line code i have to built it in Servlet/Jsp for My Mail-Client Project........
What is the problem with the code? can any one rectify it?
 
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why do you insist on asking about the code?

The message says "Connect failed". So your code tries to connect to a server on a particular computer which is supposed to be listening at a particular port. What happens if there is no such server listening? No amount of fiddling with your code is going to fix that.

So remember, real code runs in an environment. The code has to be right, and the environment has to be right too. It's not just about the code.
 
Ashish Agre
Ranch Hand
Posts: 73
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Consider gmail :
host = "209.85.153.83" //mail.google.com
uname = "myuname"
passwd = "mypasswd"



i just need to connect once to server then step by step i'll proceed
@ Paul mail.google.com is listening and we know there exists such SERVER, please kindly provide further solution...
 
Ashish Agre
Ranch Hand
Posts: 73
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is i read from James Holmes small Article in BOOK
POP3
Post Office Protocol version 3 (POP3) is the dominant protocol for retrieving e-mail from
e-mail servers on the Internet. POP3 is very basic, allowing e-mail clients to access only
mail in a default “Inbox” folder.
IMAP
Internet Message Access Protocol (IMAP) is another protocol for retrieving e-mail from
e-mail servers on the Internet. IMAP has more features than POP and supports retrieving
messages from multiple accounts and folders. IMAP also supports the use of public folders
where messages are shared.

Kindly concentrate on getting rid off the problem instead other issues...
 
Ashish Agre
Ranch Hand
Posts: 73
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:Why do you insist on asking about the code?
So remember, real code runs in an environment. The code has to be right, and the environment has to be right too. It's not just about the code.

 
Ashish Agre
Ranch Hand
Posts: 73
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
See
use host = "pop.gmail.com";
Store store = session.getStore("pop3s");
thanks all for JavaMail- FAQ .........
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic