Refactor mails