Gmail - IMAP Timeout

Hello,

My client is running into an issue with getting emails from Gmail via IMAP.

All settings are correct and accessing their emails works perfectly on my machine with their credentials, but when we run the process on their machine we get the following error from the Get IMAP Mail Messages activity:

RemoteException wrapping System.TimeoutException: Timed out while waiting for Mail Service to connect

This is not related to the actual activity timeout, as this exception is thrown before we actually reach the configured timeout duration (60 seconds). I have created a minimal reproduction process for them to run as we narrow down the issue. All settings are correct and validated on a working machine, but the process fails to run on their computer.

This has something to do with their corporate PC setup or windows user rights, but I can’t nail it down. Has anyone encountered this error and found that it was related to something like that? I haven’t seen any topic on the forums that mentions this specific error that it timed out waiting for the “Mail Service” to connect. It is somewhat of a mysterious message because I cannot determine what it means by Mail Service, Gmail or the windows mail service.

Some background: This process is being used to retrieve emails from a specific folder that contain invoices in the form of PDF attachments, which are then ran through document processing in order to validate and compare the invoice to purchase orders they made in their system, checking for errors, and then entering the invoice in their system if everything is correct.

Let me know if you have any ideas because I am at a loss, and this is a critical error that is stopping any progress with my project.

@Joseph_Iaquinto

Check below post for your reference

Also re-check the settings are correct as per the below video

Hope this may help you

Thanks

It turns out to be a fault with the UiPath.Mail.Activities package not having a dependency listed. Once we installed the latest ImapX package directly, everything ran swimmingly on the problematic machine.

Hi @Joseph_Iaquinto
Check any antivirus / firewall is blocking , some times this might be an issue too

Thanks

That’s true but for this specific message it was certainly a missing required package. Hopefully Mail.Activities v1.0.6+ will resolve these issues for anyone in the future.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.