refactor to be able to use already initialised stmp servers