refactor(mailconnector): Use new API from DocManager (closes #4697)