Refactored EmailManager