Refactored and added check for excluding multi message(threads) emails