Condition added in alarm email function