Mail Activity - Mail that matches the specified binding constraints threw an exception

Hello everyone,

I have been facing an issue with the mail activity for a while now. whenever I run the process on my studio or even when I publish it and I run it, It fails. Bellow is the failure message from the Orchestrator. All the packages are up to date and I made sure that they exist with the packages folder on the machine.

Can you please let me know what’s the issue here.

" The invocation of the constructor on type ‘UiPath.Mail.Exchange.Activities.SendExchangeMail’ that matches the specified binding constraints threw an exception.

RemoteException wrapping System.Xaml.XamlObjectWriterException: The invocation of the constructor on type ‘UiPath.Mail.Exchange.Activities.SendExchangeMail’ that matches the specified binding constraints threw an exception. —> RemoteException wrapping System.IO.FileNotFoundException: Could not load file or assembly ‘Microsoft.Identity.Client, Version=4.32.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae’ or one of its dependencies. The system cannot find the file specified.
at UiPath.Shared.Authentication.Microsoft.Services.MsalLogonService…ctor(IMsalTokenRepository msalTokenRepository)
at UiPath.Mail.Exchange.EwsClient.ExchangeServiceFactory…ctor()
at UiPath.Mail.Exchange.Activities.ExchangeActivity1..ctor() at UiPath.Mail.Exchange.Activities.SendExchangeMail..ctor() --- End of inner exception stack trace --- at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateInstance(XamlType xamlType, Object[] args) at System.Xaml.XamlObjectWriter.Logic_CreateAndAssignToParentStart(ObjectWriterContext ctx) at System.Xaml.XamlObjectWriter.WriteStartMember(XamlMember property) at System.Xaml.XamlWriter.WriteNode(XamlReader reader) at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter) at System.Activities.XamlIntegration.FuncFactory1.Evaluate()
at System.Activities.DynamicActivity.OnInternalCacheMetadata(Boolean createEmptyBindings)
at System.Activities.Activity.InternalCacheMetadata(Boolean createEmptyBindings, IList1& validationErrors) at System.Activities.ActivityUtilities.ProcessActivity(ChildActivity childActivity, ChildActivity& nextActivity, Stack1& activitiesRemaining, ActivityCallStack parentChain, IList1& validationErrors, ProcessActivityTreeOptions options, ProcessActivityCallback callback) at System.Activities.ActivityUtilities.ProcessActivityTreeCore(ChildActivity currentActivity, ActivityCallStack parentChain, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList1& validationErrors)
at System.Activities.ActivityUtilities.CacheRootMetadata(Activity activity, LocationReferenceEnvironment hostEnvironment, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList`1& validationErrors)
at System.Activities.Hosting.WorkflowInstance.ValidateWorkflow(WorkflowInstanceExtensionManager extensionManager)
at System.Activities.Hosting.WorkflowInstance.RegisterExtensionManager(WorkflowInstanceExtensionManager extensionManager)
at System.Activities.WorkflowApplication.EnsureInitialized()
at System.Activities.WorkflowApplication.Enqueue(InstanceOperation operation, Boolean push)
at System.Activities.WorkflowApplication.SimpleOperationAsyncResult.Run(TimeSpan timeout)
at System.Activities.WorkflowApplication.BeginRun(AsyncCallback callback, Object state)
at UiPath.Executor.RobotRunner.d__89.MoveNext() "

@nawalalmahmoud

Check below for your reference

Hope this may help you

Thanks