[FIX] mail: misc bug fixing