UiPath StudioX - Sending mail from outlook desktop account Activity - Failing


I’m using UiPath StudioX Community Edition and I have created a workflow to send a saved value via Outlook mail to either same outlook ID/ some other account. But I’m getting error everytime. Below are the logs -

11/08/2021 22:53:38 => [Debug] Execution started for file: Main
11/08/2021 22:53:39 => [Info] GettingToKnowStudioX execution started
11/08/2021 22:53:40 => [Info] Audit: Using Web App. Browser: Chrome URL: Find Unicorn Name
11/08/2021 22:53:41 => [Info] Audit: Using Excel File: C:\Users\DELL EXCLUSIVE\Downloads\Unicorn Name.xlsx
11/08/2021 22:53:45 => [Info] Audit: Using Outlook. Account: abc003@outlook.com
11/08/2021 22:53:45 => [Info] Audit: Send Outlook Mail. To: abc003@outlook.com CC: Draft: False
11/08/2021 22:53:46 => [Error] System.Runtime.InteropServices.COMException (0x80004005): The operation failed.
at Microsoft.Office.Interop.Outlook.ApplicationClass.CreateItem(OlItemType ItemType)
at UiPath.Mail.Outlook.OutlookApiV2.SendMailInternal(MailMessage mailMessage, AccountWithStore account, SendMailRequest sendMailRequest, Action1 SetBody) at UiPath.Mail.Outlook.OutlookApiV2.SendMail(MailMessage mailMessage, AccountWithStore account, SendMailRequest sendMailRequest, IDictionary2 contentIdToImageFileMap)
at UiPath.Mail.Outlook.OutlookService.<>c__DisplayClass21_0.b__0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at UiPath.Mail.Activities.Business.SendMailX.d__44.MoveNext()
— End of stack trace from previous location where exception was thrown —
at UiPath.Shared.Activities.AsyncTaskCodeActivityImplementation.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at UiPath.Shared.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
11/08/2021 22:54:01 => [Info] Ignore
11/08/2021 22:54:01 => [Info] GettingToKnowStudioX execution ended in: 00:00:22

Please help.


Thank you for the logs , they are usually the first things that we ask. Now in addition to them one has to ask what version of StudioX / Mail package and Office are you using ?


Hey, it’s resolved. Thank you!
Just closed the outlook and started receiving mails.