refactored mail sender tests