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.
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.
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.
Use the following steps to confirm that your Gmail settings are configured correctly in Sugar:
- 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.
- Click “Prefill Gmail™ Defaults” to ensure that the mail server address, protocol, and port are correct.
- Re-enter the values for the User Name and Password fields.
- 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.
Use the following steps to remove any Google restrictions which may be preventing access to your Sugar instance:
- Log into the affected Google account and navigate to https://myaccount.google.com.
- Click “Sign-in & security” located on the left side of the page.
- 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.
- On the Sign-in & security page, click “Device activity & notifications” to the left of the page.
- 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.
- Alternatively, you may receive an email in the affected address from email@example.com with the subject “Suspicious sign in prevented”.
- 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.
- On the resulting page, follow the steps provided by Google including visiting the captcha link.
- Follow any additional instructions then click “Continue” to complete the process on the Google site.
- If successful, you will see a message stating “Account access enabled”.
- 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.