refactor mailings