Added tracking for the number of logs mailed. Fixed a bug that prevented the mail view from disappearing