Gmail IMAP activity is not working properly

Hi All,

I am reading emails from Gmail through IMAP, but this activity sometimes works and sometimes doesn’t.
Please suggest any solutions if you have them.

What happens when is not working?
What are the steps to let it work again?

Hi @satyendrap
To handle intermittent failures, use a Retry Scope activity that attempts to fetch emails a few times before failing. This will give the activity more chances to work when Gmail or the network is temporarily unresponsive.

On starting the bot, sometimes it works but sometimes it doesn’t, with the following errors:

  1. ‘Get IMAP Mail Messages: The IMAP server has unexpectedly disconnected.’
  2. ‘Get IMAP Mail Messages: The operation has timed out.’

But after some time, it automatically starts working and after sometimes again its stops working.

We are using Retry Scope activity but still getting error.

Based on the provided details, the issue not relies in the UiPath robot.
You either need to increase the timeout in the activity and add a retry for 2-3 times in an interval of 1 minute, or you need to find at the networking level why the IMAP server has unexpectedly disconnected or check with the IMAP server administrator if the details which are used in Studio are correct.

Check this https://uipath.my.salesforce-sites.com/CaseView/articles/Knowledge/Authentication-fails-As-remote-party-has-closed-the-transport-stream?lang=en_US and try to upgrade the UiPath.Mail.Activities package to a recent version.