refactored mail helper methods