Cannot Send Outlook Mail Message in a Catches section


#1

Hi,

I want to send an email when a sequence caught an exception.

so, I create the Try Catch activity like this.
(There are only ReadTextFile activities in the Try section.)

But it does not work when I run it without running Outlook application.
Error…
Send Outlook Mail Message : Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT))

With running Outlook application, it works.

How to fix this error?

UiPath Version(trial) : 2016.2.6274
Outlook 2010 Version : 14.0.7


#2

Hi,

My assumption would be like this:
As “Send Outlook Mail Message” activity consider your account as default and you don’t have login(provide outlook credentials) in the activity and it probably works when your outlook is already open(you already logged in).
On second thought as outlook is not open which makes difficult to auto login and some application won’t allow that.


#3

Hi @natsuki,

Firstly you can use Find > Element exists activity (it also works even if it is not visible) take the element of outlook and check whether the outlook is open flowdecision or( if in a sequence) if open then directly send an email by configuring the address else open the application using open application activity first and then send an email.

Hope this helps.


#4

Thank you for your help!

The Account property of this “Send Outlook Mail Message” activity was blank.
I fill in the property and the activity works normally.

I assumed that the properties had no problem because it could open Outlook outside of the Try Catch activity.