Refactor package for email sender