ajust mail system into common module