Reason why my Send Outlook Desktop Mail Message Activity says timed out

Hi all

I have created an automation. It worked well at the beginning, but after the first day. It keeps saying as follows: Send Outlook Desktop Mail Message: The operation has timed out.

Can anybody figure out?

@Ys_Zyd

Follow this KB

Here is what the diagnosis tool says but I cannot figure it out.
Can anyone interpret?


in Main.xaml
at SendOutlookMail “Send Outlook Desktop Mail Message”
at Sequence “Main Sequence”
at Main “Main”

System.TimeoutException: The operation has timed out.
at UiPath.Mail.Activities.Extensions.TaskExtensions.TimeoutAfter(Task task, Int32 timeoutMs)
at UiPath.Mail.Activities.SendMailActivity.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.Shared.Activities.ContinuableAsyncCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at UiPath.Mail.Activities.BaseMailContinuableAsyncActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Use c# code with Microsoft.Office.Interop in “coded workflow” directly.
Don’t use the activity.

Hi @Ys_Zyd

Could you check the setting for Programmatic Access in Outlook.
It can block automations, based on how well your anti virus is up-to-date.
You could try and disable the setting.

You find it here: FilesOptionsTrust Center
Click Trust Center button → Programmatic Access

Regards
Soren

The stack trace is basically saying the failure is happening inside the Send Outlook Desktop Mail Message activity itself — not in your sequence logic. Can you try below steps:

  1. Update UiPath.Mail.Activities package
  2. Make sure Outlook is fully opened and responsive before this step runs