Troubleshooting Connecting Sugar to Gmail

    Overview

    Sugar® instances may fail to connect to a Gmail account due to Google attempting to prevent suspicious activity. This issue can be encountered when any user is configuring a personal inbound email from their Emails module or when an admin is configuring a Group or Bounce-Handling account via Admin > Inbound Email. The resolution steps are the same for both and will be discussed in this article.

    Note: This article pertains to Sugar versions 7.9.x and earlier.

    Symptoms

    When configuring an inbound email account to connect to Gmail, you may be unable to select a trash folder or be presented with an error message when attempting test the settings. This is an indication that Google is restricting Sugar from making the connection. 

    TSConnectingToSugarToGmail ErrorMsg
    FailedAuthenticate2

    Resolution

    To resolve this issue, you should first confirm your email configuration. If the issue continues to persist after the email settings are confirmed, you will need to remove any Google restrictions. The following sections provide detailed instructions on how to perform these actions. 

    Confirming Email Configuration

    Use the following steps to confirm that your Gmail settings are configured correctly in Sugar:

    1. Open the inbound email settings you are attempting to configure (i.e.(Admin > Inbound Email or the Emails module).
      Note: For more information on configuring system-wide inbound email accounts, please refer to the Email documentation in the Administration Guide. For more information on configuring your personal inbound email account, please refer to the Emails documentation in the Application Guide.
    2. Click “Prefill Gmail™ Defaults” to ensure that the mail server address, protocol, and port are correct.
    3. Re-enter the values for the User Name and Password fields.
    4. Click the Select button to the right of the Trash Folder field.

    If the Trash folder can be selected, the connection to Gmail was successful and you can choose the appropriate folder then click “Done” to preserve your changes. If you cannot access your Trash folder and continue to experience the issue described in the Symptoms section, please proceed to the next section. 

    Removing Google Restrictions

    Use the following steps to remove any Google restrictions which may be preventing access to your Sugar instance:

    1. Log into the affected Google account and navigate to https://myaccount.google.com.
    2. Click “Sign-in & security” located on the left side of the page.  
    3. If the 2-step verification is enabled, follow the steps on the Sign in using App Passwords page on Google’s support site to set up a password for your Sugar instance.
      Note: If the 2-step verification is disabled, proceed with the remainder of these steps.
    4. On the Sign-in & security page, click “Device activity & notifications” to the left of the page. 
    5. Verify if the failed authentication attempt from Sugar is logged under “Recent security events”. If the failed authentication attempt is logged, please follow the steps provided by Google in order to grant access from your Sugar instance.
    6. Alternatively, you may receive an email in the affected address from accounts-noreply@google.com with the subject “Suspicious sign in prevented”.
    7. The IP address listed in the email should match your on-site Sugar server or our SugarCloud service environment, depending on how your instance is hosted. Assuming the IP address does match, click the second link (http:///support.google.com/mail?p=client_login) in the email to confirm that the login attempt was valid.
      Note: For more information on IP addresses for cloud instances, please refer to the Configuring Your SMTP Server to Work With SugarCloud article.
    8. On the resulting page, follow the steps provided by Google including visiting the captcha link. 
    9. Follow any additional instructions then click “Continue” to complete the process on the Google site.
    10. If successful, you will see a message stating “Account access enabled”.
    11. Lastly, you will need to clear your web browser’s cache. For more information, please refer to the Clearing Browser Cache article.

    Once your account access is enabled successfully, please navigate back to your inbound email settings in Sugar to try connecting to Gmail again.  

    in Email

    Reach out to us for help