sugarcrm/sugarcrm_dev — pull request #84 by Cosmologist (2012-02-20 10:05:07+00:00)
Title: checkEmail Bug

We had some problems while checking e-mail throgh EMails module - the process has taken 5 minutes!
We began to examine the problem - the analysis showed that SugarCRM in certain cases connects to the mail server(through IMAP) with wrong password.
The error appeared when several folders were indicated in user's settings ($current_user->getPreference('showFolders', 'Emails')) and one of the folders was deleted.

The folder existence check should be from InboundEmail::retrieve, otherwise the password wiil be spoiled by repeated.
While checking e-mail, in file EmailUIAjax ( row 570)- the folder existence check should be carried out - if the folder doesn't exist - it shouldn't be checked.