Send Outlook Mail Message Fails

Hello, I’m trying to send an email using the Send Outlook Mail Message activity, however every time I run it, varying errors. This is one of them:

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.SystemException: Creating an instance of the COM component with CLSID {0006F03A-0000-0000-C000-000000000046} from the IClassFactory failed due to the following error: 8001010a The message filter indicated that the application is busy. (Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER)). ----> System.Runtime.InteropServices.COMException: Creating an instance of the COM component with CLSID {0006F03A-0000-0000-C000-000000000046} from the IClassFactory failed due to the following error: 8001010a The message filter indicated that the application is busy. (Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER)).
   at System.Runtime.Remoting.RemotingServices.AllocateUninitializedObject(RuntimeType objectType)
   at System.Runtime.Remoting.Activation.ActivationServices.CreateInstance(RuntimeType serverType)
   at System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(RuntimeType serverType, Object[] props, Boolean bNewObj)
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Activator.CreateInstance(Type type)
   at UiPath.Mail.OutlookAPI.InitOutlook()
   --- End of inner ExceptionDetail stack trace ---
   at UiPath.Mail.Activities.SendMailActivity.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)
4 Likes

@lien

Welcome to the Uipath Community.

Is outlook application installed in that machine ? And also is it in Online ?

Run Uipath studio as Administrator and then try once.

Hi, Outlook is installed in the machine, and yes it is online. I’ve successfully retrieve multiple emails before but I can’t seem to send one. I tried running Uipath as Administrator. There’s another error:

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.Runtime.InteropServices.COMException: The operation failed.  The messaging interfaces have returned an unknown error. If the problem persists, restart Outlook. The operation failed. An object cannot be found.
   at UiPath.Mail.Activities.SendMailActivity.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)

I tried running it again and there’s another error:

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.SystemException: The message filter indicated that the application is busy. (Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER)) ----> System.Runtime.InteropServices.COMException: The message filter indicated that the application is busy. (Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER))
   at Microsoft.Office.Interop.Outlook.ApplicationClass.get_Version()
   at UiPath.Mail.OutlookAPI.InitOutlook()
   --- End of inner ExceptionDetail stack trace ---
   at UiPath.Mail.Activities.SendMailActivity.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)

@lien

Are you using Enterprise or Community Edition of UIpath ?

If you are using Enterprise Edition then contact uipath support team and show these logs and they will help you better in this.

Alright, thank you.

1 Like

I think I’ve figured it out. I’m not sure if the SentOnBehalfOfName property accepts just any kind of string but I tried removing the string I placed there, waited a few seconds, ran the workflow, and then it worked.

9 Likes

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