Results 1 to 3 of 3
  1. #1
    nyk976 is offline Member
    Join Date
    Jan 2010
    Rep Power

    Default error in connecting to gmail server

    hi guys,

    i am having problem in connecting to gmail server by using java.
    the error its giving is "javax.mail.MessagingException: Connect failed;
    nested exception is:"

    is this error is due to wireless connection through my laptop or something else? i am using netbeans for my environment, i have also added the javamail api for the same! stil i am getting the error!!

    please help!!:(

  2. #2
    FON is offline Senior Member
    Join Date
    Dec 2009
    Belgrade, Serbia
    Rep Power

    Default gmail pop


    Incoming Mail (POP3) Server - requires SSL:
    Use SSL: Yes
    Port: 995

    This command has to work from command line :

    telnet 995

    ...If not somethings not OK with your network

    You have to manually enable telnet on VIsta or Windows 7.

    Here is example that works fine:

    Java Tips - Connecting GMail using POP3 connection with SSL

    If code is not working well
    go to method
    and put comment on FetchProfile:

    Java Code:
    		// Use a suitable FetchProfile
    		FetchProfile fp = new FetchProfile();
    		folder.fetch(msgs, fp);
    ...Now when you run code
    it should list all of your INBOX messages.

    Be sure that your gmail account is set properly.

    So login to your gmail account first
    and then click this link: will lead you directly to your account Settings for POP.

    If everything is set fine you will find no problem.

    Any other problem related to JAVA MAIL API,
    go to "JAVA MAIL API FAQ" and you will find it all there.


  3. #3
    nyk976 is offline Member
    Join Date
    Jan 2010
    Rep Power

    Lightbulb gmail connectivity

    hey thanks for the help!!
    i didnt saw the link u provided the same (java tips)!
    it wil really help me.

    thank you.:)

Similar Threads

  1. error in host
    By kib_tse in forum Networking
    Replies: 15
    Last Post: 03-10-2011, 07:25 PM
  2. connecting to a server
    By paddala in forum Advanced Java
    Replies: 4
    Last Post: 02-16-2010, 08:40 PM
  3. Connecting to SQL Server 2008 DB
    By Lyle in forum Eclipse
    Replies: 1
    Last Post: 02-22-2009, 05:26 PM
  4. Connecting To SQL Server
    By rmaadil in forum JDBC
    Replies: 7
    Last Post: 08-20-2008, 06:53 PM
  5. Connecting to a Web server
    By Java Tip in forum
    Replies: 0
    Last Post: 04-07-2008, 08:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts