Issue #6882 mail analytics implementation