Get IMAP Mail Messages Timed Out While Waiting For Mail Service To Connect

How to resolve when IMAP Mail Messages obtains - Timed out while waiting for Mail Service to connect?

This article provides the resolution for error "Get IMAP Mail Messages: Timed out while waiting for Mail Service to connect" which might be obtained when trying to fetch mails from a Gmail account.

For fetching emails from the Gmail account through the IMAP protocol, make sure below requirements are first met:

If still an error persists in UiPath, try fetching through the below PS script. This script will print the subject of first ten emails. Update the respective details in the PowerShell script


Follow the below procedure to get imapx.dll: You can download the imapx from Manage Packages in UiPath

  1. Install IMAPX


  1. After installation you will find the dll in the below location C:\Users\YourUsername\.nuget\packages\imapx\\lib\net452

If the error "cannot be loaded because running scripts is disabled on this system" is obtained when fetching mails through the above PS script, talk to your admin or check Microsoft documentation to allow execution. Read Set Execution Policy .

If the issue is still not resolved, attach the results of execution of above PS script, Mail activity package version and the connection details and create a support ticket with UiPath Product Support.

1 Like

A post was split to a new topic: Powershell script with Get IMAP mail messages activity is giving "Timed out while waiting for Mail service to connect. "