Tuesday, August 10, 2010

SugarCRM Troubleshooting: SMTP Problems on Hostgator

Here is a good example of a problem where its source could have more easily been discovered by having shell (or similar) access to the server hosting SugarCRM.

While in the process of attempting to configure SugarCRM to use a GMail account, the following error was continually encountered: 

Can't connect to '{}' as user '' with password 'xxx': Can't connect to,993: Connection refused.  

Changing user names, passwords, etc. all resulted in the same error. However, using the same credentials on a locally installed copy of the same version of SugarCRM worked flawlessly.

Things got more mysterious when the output of phpinfo() on both systems appeared to match each other, thus eliminating a previously encountered problem I detailed in an earlier post. Having eliminated all other variables, I was left with one final one: connectivity/firewall issues.

Sure enough, upon further research, I came upon a thread on the hosting provider's support forums (Hostgator) speaking to this very point. As it turns out, Hostgator locks down some outgoing traffic, hence the error. The only way to correct the matter is to contact Hostgator technical support and ask them to adjust the firewall settings for your account.


  1. Thank you so much for posting this. It solved my problem. The SugarCRM forum was no help at all. Had to search high and low for this post though.

  2. Hi Angel,
    Your post gave me some hope in my quest to configure Gmail with SugarCRM, but my hosting provider (JustHost) told me they are not blocking that port. But I still believe there could be a problem with the hosting. Is there anything else you can think of they need to set up in order for me to configure Gmail?

  3. @Bernardo:

    Are you getting the same exact error? If not, what is the one you are getting?

    Have you tried it using a version of Sugar installed elsewhere, like on your computer?

    Did you give this post a look?

  4. Thanks Angel, Gmail IMAP (same user, pssw., etc) has worked OK with me with local instalations. The error I'm getting is "Connection failed to,993: Connection timed out
    Please check your settings and try again."

  5. Hi I have been also experiencing issues with gmail and sugar crm (ver.6 CE) smtp settings. I do have shell access on my server however, I can't seem to figure out where the block is coming from. The sugar forum has been no help. Appreciate any feedback at all..

  6. I am getting the following error:

    Tue Jan 18 10:09:55 2011 [24288][68431a33-3c92-c35c-18ed-4d34053efe8b][FATAL] SMTP -> ERROR: RCPT not accepted from server. Code: 555 Reply: 555 5.5.2 Syntax error. jv9sm4616240icb.1

    Tue Jan 18 10:09:55 2011 [24288][68431a33-3c92-c35c-18ed-4d34053efe8b][FATAL] SugarPHPMailer encountered an error: SMTP Error: The following recipients failed:

  7. @Bernardo:

    Have you verified the other items in my previous reply?


    Unfortunately there is no one answer to potential problems that may arise. As with Bernardo's situation, it could be that you are missing the SSL module for PHP, etc. Take a look at the other post that I referenced in my previous reply to Bernardo. That may help as well.


    That error usually indicates there is a problem with the email address itself. i.e. It is not formatted correctly. Try your own email address and see if that works.

  8. Hi Angel,
    So far you have mentioned:
    - IMAP, SSL and Kerberos supported.
    I checked with JustHost and they are all supported. (SSL is shared)

    -Check Local installation
    I have tried that and it works flawlessly.

    - What error are you having?
    My error is "Connection failed to,993: Connection timed out
    Please check your settings and try again."

    I'm still not able to connect through IMAP, although I have no problem at all with SMTP.

    Thanks for your help

  9. @Bernardo

    The fact it works locally would seem to confirm that the problem is with the environment, i.e. PHP config, etc.

    Like I said in my earlier reply, there is no single answer that addresses the issue on every server.

    Have you tried connecting it to a test mail account on another mail server? Preferably, one that doesn't use SSL?

    Have you checked the output of PHPINFO() for your install? The fact your provider says it is supported doesn't really tell us much other than it can be used.

  10. Hi Angel,
    My PHPINFO shows:
    IMAP c-Client Version: 2007e
    SSL Support:enabled
    Kerberos Support: enabled
    Registered PHP streams: ... imap, imaps...

    OpenSSL support: enabled
    OpenSSL Version: OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008

    I also tested with another IMAP account (fastmail) and it doesn't work either. However, as I said in my previous post, my IMAP configuration works fine with a locally installed SucarCRM.


  11. Oh, and one last thing. My log (debugger) says: Can't open mailbox {}INBOX: invalid remote specification

    I hope this will clarify my issue.

  12. is a very good hosting provider with great customer support and provides managed, affordable, secure, reliable and high performance servers.


Your comments, feedback and suggestions are welcome, but please refrain from using offensive language and/or berating others. Thank you in advance.