[IMP ]add failure_reason field and counting number of fail mail