mail listener start as function
bit more of refactor at mail listener and mail domain