Email service is refactored