Added mail result details and fixed some bugs