Minor changes in mail logging and generics