Send Outlook mail Message is not working

23.12.0-beta.15287+Branch.release-v23.12.0.Sha.6f78cf34182e239b45fdde518f0d7807b8290d82

Source: Send Outlook Mail Message

Message: An error occured while trying to initialize the Outlook session.
Make sure Outlook is installed on your system! If Outlook is installed this error might be due a corrupt installation. Please repair Office installation.

Exception Type: System.SystemException

System.SystemException: An error occured while trying to initialize the Outlook session.
Make sure Outlook is installed on your system! If Outlook is installed this error might be due a corrupt installation. Please repair Office installation. β€”> System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (0x80040154 (REGDB_E_CLASSNOTREG)). at System.RuntimeTypeHandle.AllocateComObject(Void* pClassFactory)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)
at System.Activator.CreateInstance(Type type)
at UiPath.Mail.OutlookAPI.<>c.<.cctor>b__38_0()
at UiPath.Mail.OutlookAPI.GetApp()
at UiPath.Mail.OutlookAPI.InitOutlook()
β€” End of inner exception stack trace β€”
at UiPath.Mail.OutlookAPI.InitOutlook()
at UiPath.Mail.OutlookAPI.SendMailInternal(MailMessage mailMessage, String account, String sentOnBehalfOfName, String to, String cc, String bcc, List1 attachments, Boolean isDraft, Action1 SetBody)
at UiPath.Mail.OutlookAPI.SendMail(MailMessage mailMessage, String account, String sentOnBehalfOfName, String to, String cc, String bcc, List`1 attachments, Boolean isDraft, Boolean isBodyHtml)
at UiPath.Mail.Outlook.Activities.SendOutlookMail.<>c__DisplayClass37_0.b__0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
β€” End of stack trace from previous location β€”
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
β€” End of stack trace from previous location β€”
at UiPath.Mail.Outlook.Activities.SendOutlookMail.SendMailTask(AsyncCodeActivityContext context, Receiver reciever, MailMessage mailMessage, CancellationToken cancellationToken, Boolean isNewMessage, String body)
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.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

1 Like

Hi @Harshita_Chhabra

Send Outlook Mail Message activity and Outlook activities will work when the Outlook application is installed in your machine.

For using Outlook activities definitely you have to install Outlook application, If not installed yet do install it.

If already installed then update the Ms Office applications, this may sort.

Suggestion : If you are not able to install Outlook application then use the Send SMTP Mail Message activity, by this activity not required to install Outlook.

Hope it helps!!

2 Likes

I suggest using the Send SMTP Mail Message activity. Much simpler, no Outlook required.

2 Likes

Hi @Harshita_Chhabra,

Welcome to the UiPath Community!

As mentioned by @mkankatala, it seems Outlook installation issue or not installed on the machine issue to me.

If you should be using Outlook then you will have to get the Outlook fixed/Installed
else you have below options.

To Get/Read Emails:

  1. Get IMAP Mail Messages
  2. MicrosoftOffice365 Activity Get Mail

To Send Emails:

  1. Send SMTP Mail Message
  2. MicrosoftOffice365 Activity Send Mail/Reply To Mail

Thanks,
Ashok :slight_smile:

1 Like

@Harshita_Chhabra ,

Make sure that the outlook is installed correctly.
Also, make sure that you have setup your mail box correctly with your mail id in outlook.

Thanks,
Tharusha

1 Like

Okay Thank you so much for the help

2 Likes

outlook is installed in my system

1 Like

Okay I’ll use the other options
Thank you so much for the help

1 Like

Okay Thank you so much

1 Like

@Harshita_Chhabra,

Please don’t forget to mark the answer as solution so someone with same issue will find it more quickly.

Thanks,
Ashok :slightly_smiling_face:

1 Like

Try to reinstall the outlook .
Or Try with other options which is available.

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