Results 1 to 5 of 5

Thread: Google Apps/Gmail IMAP : Timeout error

  1. #1
    Circlefusion is offline Junior Member
    Join Date
    Jun 2010
    Posts
    3

    Cool Google Apps/Gmail IMAP : Timeout error

    I've scoured through the help forum. There are a lot of Gmail related threads. I didn't see any that address my particular scenario.

    My IMAP configuration for my google apps account is giving a timeout error.



    I am running SugarCRM 5.5.4 on a dedicated server
    I know file permissions are good since I recently went through upgrading Sugar.

    I opened the 993 port in iptables
    I checked phpinfo() to make sure IMAP module is installed. I also confirmed it with this PHP code

    Code:
    if (!extension_loaded('imap'))
    {
    	echo "Not Installed";
    	exit;
    }
    I tested the connection by using this PHP code
    Code:
    $fp = @fsockopen("imap.gmail.com", 993, $errno, $errstr, 5);
    if($fp) echo "connect success";
    else echo "connect failure: ".$errstr;
    All of that passed.

    I know my Google Apps account works. I logged into it directly and I also can get smtp.gmail.com to work in SugarCRM using the same Google Apps account.

    I also made sure IMAP is turned ON in my Google Apps account

    I've done all of the above after googling for hours.
    I can't find anything else to try.

    Does anyone else have a suggestion or idea about this problem?
    Last edited by Circlefusion; 2010-06-28 at 03:18 AM. Reason: added: on a dedicated server

  2. #2
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: Google Apps/Gmail IMAP : Timeout error

    Your PHP code uses imap.gmail.com for the mail server, bu your Sugar settings are set to use imap.googlemail.com. I believe both are supposed to be imap.gmail.com
    Regards,

    Angel Magaņa
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

  3. #3
    Circlefusion is offline Junior Member
    Join Date
    Jun 2010
    Posts
    3

    Default Re: Google Apps/Gmail IMAP : Timeout error

    Thanks for your reply.

    Yes, that is true. That is one detail I forgot to mention.
    I had tried both imap.gmail.com and imap.googlemail.com from reading various suggestions on the topic.
    AFAIK, those two are interchangeable.

    In my case, both of them gives the same result.

  4. #4
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: Google Apps/Gmail IMAP : Timeout error

    Check out a test script I put up on this thread a while back: http://www.sugarcrm.com/forums/showthread.php?t=55018

    Give it a test with your settings and see if you are able to connect via the script.
    Regards,

    Angel Magaņa
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

  5. #5
    Circlefusion is offline Junior Member
    Join Date
    Jun 2010
    Posts
    3

    Default Re: Google Apps/Gmail IMAP : Timeout error

    Ah, very nice.

    Ok, this provides some more clues.

    With your default script setting...

    Code:
    $server = '{imap.gmail.com:993/ssl}INBOX';
    I also tried

    Code:
    $server = '{imap.gmail.com:993/imap/ssl}INBOX';
    both of those gave me this error

    Code:
    Could not connect: Certificate failure for imap.gmail.com: unable to get local issuer certificate: /C=US/O=Google Inc/CN=Google Internet Authority
    But then I googled around a bit for answers and I changed the server line to:

    Code:
    $server = '{imap.gmail.com:993/imap/ssl/novalidate-cert}INBOX';
    and that worked. The script displayed the number of messages in my inbox.

    So, I'm going to keep looking into the problem with the certificate validation failure.
    I assume it's some sort of missing PHP module? I just checked phpinfo() and I see openSSL module installed.

    Thank you for your help!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. E-mail (Google Apps | Gmail) and SugarCRM
    By thijsh in forum General Discussion
    Replies: 7
    Last Post: 2010-12-14, 06:56 PM
  2. Replies: 2
    Last Post: 2010-07-30, 10:40 AM
  3. How to configure Google Apps
    By ravionweb in forum Help
    Replies: 1
    Last Post: 2008-11-14, 10:38 AM
  4. 5.1.a Gmail IMAP error
    By shrekthemp in forum Installation and Upgrade Help
    Replies: 0
    Last Post: 2008-10-05, 03:50 PM
  5. Gmail Imap Functionality & Error
    By robert.blasingame in forum Help
    Replies: 1
    Last Post: 2007-12-26, 07:31 PM

Tags for this Thread

Bookmarks

Posting Permissions

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