Getting "The Operation has timed out" while using Get IMAP Mail message activity

I am getting “System.TimeoutException: The operation has timed out. at UiPath.Mail.Activities.Extensions.TaskExtensions.TimeoutAfter[TResult](Task`1 task, Int32 timeoutMs)
at UiPath.Mail.Activities.GetMailActivity.ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)
at UiPath.Shared.Activities.AsyncTaskCodeActivityImplementation.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at UiPath.Shared.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at UiPath.Mail.Activities.BaseMailAsyncActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)” error while trying to read my company outlook mails using IMAP mail activity.
Actually i want to access emails and download attachments without relying on Outlook activity since Outlook isn’t installed on the virtual machine.


Step-by-Step Solution:

  1. Increase Timeout Settings:
  • Open your UiPath workflow containing the Get IMAP Mail Message activity.
  • Find the activity and locate its properties.
  • Increase the TimeoutMS property value to allow more time for the activity to complete.
    • Example: Change TimeoutMS from 30000 (30 seconds) to 60000 (60 seconds) or higher if needed.
  1. Verify Server and Network Connectivity:
  • Double-check the IMAP server details (hostname, port, credentials) configured in the activity.
  • Ensure the IMAP server is operational and accessible from your network without any restrictions.
  1. Optimize Query Parameters:
  • Apply filters or limits to narrow down the scope of emails being retrieved.
  • Adjust the following properties based on your needs:
    • MaxNumberOfMessages: Limit the number of emails fetched per request.
    • MailFolder: Specify a specific mailbox folder to retrieve emails from.
    • Filter: Apply filters to fetch specific types of emails.
  1. Debugging and Error Handling:
  • Enable detailed logging in your workflow to capture any error messages or issues.
  • Implement error handling using Try-Catch activities to manage timeout errors gracefully.
  1. Test with Different Mail Servers:
  • If possible, test your workflow with a different IMAP server (e.g., Gmail, Outlook) to isolate server-specific issues.
    ***upgrade and downgrade the packages **
    *UiPath studio and assitant logout and login once

Hi @viveksri06

can you please give a try as below reference.

or you can try with Get Exchange mail message activity instead of using get IMAP mail message activity. please refer below doc.

Hi Baskar,
Thanks for reply but i want to use IMAP/POP3 for my company mail account and on the VM Outlook is not installed.

Hi @viveksri06

have you try the above IMAP doc reference.

is that helps?


Try to give a very big timeout like 1000000 or so and check…looks like number of messages are huge

Or to verify in the top property give 1 and give a tiemout of 60000 and check if that works


Hi @Anil_G still getting the same error.

I want to read and download attachments from my company mail ID without using Get Outlook Mail Message activity.