WIP BOOK-770, small refactor in taskmail