Remove log and replace mail callback