added portal smtp functionality