Adding mail logging