How to catch the exception when specific mails not found?

Hi All,

Inside catch block , which exception is used when mails with specific Subject are not found from the list of unread mails?

Hi @Vaishnav_Tej,
to know if this name exist in your messages i think you will use if condition (if the specific subject is equal subject) and you can make any actions in else activity. hopefully this info answer your questions.

1 Like

@Vaishnav_Tej

That is not an exception… that is kind of a business condition that you are checking

So instead use a condition to check if a mail is retrieved using mail.count with subject filter…or if you are getting all and looping…inside loop you would give if condition to check for condition and inside that set a boolean variable to true to know if atleast one mail is detected…

After the loop check the boolean …if boolean is not true then throw a business rule exception and catch it

Cheers