moving email functions from controller to service for ease-of-use
moving email functions from controller to service for ease-of-use