Send mail when two flag is false

In ReFramework,suppose i have to send mail for two cases:-

  1. Invalid Data – Flag is flase
    2.Invalid Input file
    now in case of invalid data i am able to send mail in BusinessRuleException like
    if (BusinessRuleException isnot Nothing)
    {
    send mail for invalid data
    }

for Invalid Input File – Flag is False
then how to send mail by what condition

@Rup_1

you can do like this,
When you got the scenarios

then throw business Exception with notification with custom details like below.

and

you can read the Exception message using below
if (BusinessRuleException isnot Nothing)
{
if (BusinessRuleException .Message equals(“Invalid Data”)){
send mail for invalid data
}
else
{
send mail for invalid input file
}
}