AnsweredAssumed Answered

SugarCRM / GMail / Google Apps Troubleshooting Tips

Question asked by Gary Smart on Aug 2, 2016

Hi.

 

I'm logging some tips after a pulling my hair over GMail integration with SugarCRM 7. I hope this saves someone a few headaches!

 

IMAP Account Access

Make sure you have IMAP enabled for the GMail account. This settings is within GMail.

 

Allow Less Secure Clients

SugarCRM will not be able to connect unless you lower security requirements in your Google Account. This settings is in Google “My Account” Settings under Sign-in & Security.

 

Further Troubleshooting Inbound Email Scheduler

So all the above is correct. You can successfully connect in SugarCRM but the inbound email scheduler just does not work….

Check your sugarcrm.log file. You might see an error like this.

Tue Aug 2 11:49:11 2016 [95944][1][FATAL] SCHEDULERS: could not get an IMAP connection resource for ID [ e7b9549a-4983-ab2a-3126-579fef69ebd9 ]. Skipping mailbox [ Sugar Email ].

 

The SugarCRM scheduler is initiated via CRON using PHP via the CLI.

 

Try running the cron manually. Eg:

$ cd <your_sugar_installation>
$ php -f cron.php

 

Now check sugarcrm.log and within SugarCRM itself. Did inbound emails get processed?

 

If they did great – we can process via the command line, but CRON is not…. perhaps there are several PHP versions on the server and the CRON job is not using the correct one? I spend a long time scratching my head over this one.

 

I updated my crontab to look like this, putting the full path to PHP.

 

* * * * * cd <sugar_installation>; /usr/local/5.5.38/bin/php -f cron.php > /dev/null 2>&1

 

Special Characters in your GMail Password

 

Still no luck? This is a sneaky one that I found. Make sure your GMail account password DOES NOT have special characters (like %^$@, etc…) in it.

 

I found that with special characters in the password:

  • You can login via GMail
  • Within SugarCRM tests succeed
  • Within SugarCRM the email client works
  • BUT the CRON/Scheduler processing of inbound emails will fail!

Outcomes