add mail logging