This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes MessagingException: Connect failed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "MessagingException: Connect failed" Watch "MessagingException: Connect failed" New topic
Author

MessagingException: Connect failed

Ashish Agre
Ranch Hand

Joined: Jan 22, 2011
Posts: 73



| B.E IT | SCJP 6.0 98 % |
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4523
    
    5

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


luck, db
There are no new questions, but there may be new answers.
Ashish Agre
Ranch Hand

Joined: Jan 22, 2011
Posts: 73

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?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18123
    
    8

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

Joined: Jan 22, 2011
Posts: 73

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

Joined: Jan 22, 2011
Posts: 73

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

Joined: Jan 22, 2011
Posts: 73

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

Joined: Jan 22, 2011
Posts: 73

See
use host = "pop.gmail.com";
Store store = session.getStore("pop3s");
thanks all for JavaMail- FAQ .........
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MessagingException: Connect failed
 
Similar Threads
Java mail attachmetnt include txt extensions
help me in retrieving mail
Retrieve Emails from Gmail
How To Turn On the IIS SMTP Server?
Mark Mail as SEEN